// AUTO-GENERATED FILE, MOVE TO 'gh_fix' FOLDER PREVENT OVERWRITING!!!!!

#include <r3/binders/auto.h>
#include <gh_global.h>
#include <r3/config/static.hpp>

extern "C" {
undefined r3_config_setIdentifier(
    const char *param_1); // 00470570 // r3_config_setIdentifier
void r3_config_setTexturesMem(
    const char *param_1); // 00470f30 // r3_config_setTexturesMem
void r3_noop(void *p_cTxt1, void *p_cTxt2); // 00401100 // r3_noop
undefined
r3_read_game_config_udp_port(void); // 00446040 // r3_read_game_config_udp_port
undefined
r3_config_setGLIMode(const char *param_1); // 004704e0 // r3_config_setGLIMode
undefined r3_set_GameDataBinPath(
    const char *param_1); // 0055a8d0 // r3_set_GameDataBinPath
undefined r3_read_game_config_modem_quality(
    void); // 00445fc0 // r3_read_game_config_modem_quality

// 004460c0
void r3_read_gli_config(void) {
  R3Config &config = getDefaultConfig();
  r3_config_setGLIMode(config.gfxGliMode.c_str());
  r3_config_setIdentifier(config.gfxIdentifier.c_str());
  r3_config_setTexturesMem(config.gfxTexturesMem.c_str());
  g_GLI_adapter = config.gfxAdapter;
  r3_config_setIdentifier(config.gfxIdentifier.c_str());
  g_config_tex_compressed = config.gfxTexturesCompressed;
  g_GLI_tnl = config.gfxTnl;
  g_GLI_trilinear = config.gfxTrilinear;
  r3_config_setTexturesMem(config.gfxTexturesMem.c_str());
  g_config_unused0 = 0;
  g_config_camera_hor_axis = config.cameraHorizontalAxis;
  g_config_camera_ver_axis = config.cameraVerticalAxis;
  r3_set_GameDataBinPath(config.gameDataBinPath.c_str());

  // GetPrivateProfileStringA
  //           (sectionName,s_SingleProcessor_005be308,&lpDefault_005be318,stringBuffer,0x104,local_204
  //           );
  //                   /* Set single processor mode */
  // iVar4 = strcmpi(stringBuffer,(char *)&s_Yes);
  // if (iVar4 == 0) {
  //   sectionName[4] = '\x01';
  //   sectionName[5] = '\0';
  //   sectionName[6] = '\0';
  //   sectionName[7] = '\0';
  //   sectionName[0] = -0x1a;
  //   sectionName[1] = 'c';
  //   sectionName[2] = 'D';
  //   sectionName[3] = '\0';
  //   sectionName + Field<0, 4>() = GetCurrentProcess();
  //   SetProcessAffinityMask((HANDLE)sectionName + Field<0, 4>(),sectionName +
  //   Field<4, 4>());
  // }
  // sectionName[4] = -0xe;
  // sectionName[5] = 'c';
  // sectionName[6] = 'D';
  // sectionName[7] = '\0';
  // r3_read_game_config_modem_quality();
  // r3_read_game_config_udp_port();
  return;
}
}
