Skip to content

Commit

Permalink
Fix #730: Removed Screen related settings parsing from WHDLoad XML
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Jan 2, 2021
1 parent 4101bf5 commit fcc5a6c
Showing 1 changed file with 1 addition and 71 deletions.
72 changes: 1 addition & 71 deletions src/osdep/amiberry_whdbooter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ struct game_options
TCHAR cpu_comp[256] = "nul\0";
TCHAR cpu_24bit[256] = "nul\0";
TCHAR sprites[256] = "nul\0";
TCHAR scr_height[256] = "nul\0";
TCHAR scr_width[256] = "nul\0";
TCHAR scr_autoheight[256] = "nul\0";
TCHAR scr_centerh[256] = "nul\0";
TCHAR scr_centerv[256] = "nul\0";
TCHAR ntsc[256] = "nul\0";
TCHAR chip[256] = "nul\0";
TCHAR fast[256] = "nul\0";
Expand Down Expand Up @@ -174,11 +169,6 @@ struct game_options get_game_settings(const char* HW)
strcpy(output_detail.cpu_24bit, find_whdload_game_option("CPU_24BITADDRESSING", HW).c_str());
strcpy(output_detail.cpu_comp, find_whdload_game_option("CPU_COMPATIBLE", HW).c_str());
strcpy(output_detail.sprites, find_whdload_game_option("SPRITES", HW).c_str());
strcpy(output_detail.scr_height, find_whdload_game_option("SCREEN_HEIGHT", HW).c_str());
strcpy(output_detail.scr_width, find_whdload_game_option("SCREEN_WIDTH", HW).c_str());
strcpy(output_detail.scr_autoheight, find_whdload_game_option("SCREEN_AUTOHEIGHT", HW).c_str());
strcpy(output_detail.scr_centerh, find_whdload_game_option("SCREEN_CENTERH", HW).c_str());
strcpy(output_detail.scr_centerv, find_whdload_game_option("SCREEN_CENTERV", HW).c_str());
strcpy(output_detail.ntsc, find_whdload_game_option("NTSC", HW).c_str());
strcpy(output_detail.fast, find_whdload_game_option("FAST_RAM", HW).c_str());
strcpy(output_detail.z3, find_whdload_game_option("Z3_RAM", HW).c_str());
Expand Down Expand Up @@ -659,11 +649,6 @@ void whdload_auto_prefs(struct uae_prefs* prefs, char* filepath)
write_log("WHDBooter - Game: JIT : %s \n", game_detail.jit);
write_log("WHDBooter - Game: CPU Compat : %s \n", game_detail.cpu_comp);
write_log("WHDBooter - Game: Sprite Col : %s \n", game_detail.sprites);
write_log("WHDBooter - Game: Scr Height : %s \n", game_detail.scr_height);
write_log("WHDBooter - Game: Scr Width : %s \n", game_detail.scr_width);
write_log("WHDBooter - Game: Scr AutoHgt: %s \n", game_detail.scr_autoheight);
write_log("WHDBooter - Game: Scr CentrH : %s \n", game_detail.scr_centerh);
write_log("WHDBooter - Game: Scr CentrV : %s \n", game_detail.scr_centerv);
write_log("WHDBooter - Game: NTSC : %s \n", game_detail.ntsc);
write_log("WHDBooter - Game: Fast Ram : %s \n", game_detail.fast);
write_log("WHDBooter - Game: Z3 Ram : %s \n", game_detail.z3);
Expand Down Expand Up @@ -871,7 +856,7 @@ void whdload_auto_prefs(struct uae_prefs* prefs, char* filepath)
// *** GAME-SPECIFICS ***
// SET THE GAME COMPATIBILITY SETTINGS
//
// SCREEN HEIGHT, BLITTER, SPRITES, MEMORY, JIT, BIG CPU ETC
// BLITTER, SPRITES, MEMORY, JIT, BIG CPU ETC

// CPU 68020/040
if (strcmpi(game_detail.cpu, "68020") == 0 || strcmpi(game_detail.cpu, "68040") == 0)
Expand Down Expand Up @@ -1009,61 +994,6 @@ void whdload_auto_prefs(struct uae_prefs* prefs, char* filepath)
cfgfile_parse_line(prefs, txt2, 0);
}

// SCREEN AUTO-HEIGHT
if (strcmpi(game_detail.scr_autoheight, "true") == 0)
{
_stprintf(txt2, "amiberry.gfx_auto_height=true");
cfgfile_parse_line(prefs, txt2, 0);
}
else if (strcmpi(game_detail.scr_autoheight, "false") == 0)
{
_stprintf(txt2, "amiberry.gfx_auto_height=false");
cfgfile_parse_line(prefs, txt2, 0);
}

// SCREEN CENTER/HEIGHT/WIDTH
if (strcmpi(game_detail.scr_centerh, "smart") == 0)
{
_stprintf(txt2, "gfx_center_horizontal=smart");
cfgfile_parse_line(prefs, txt2, 0);
}
else if (strcmpi(game_detail.scr_centerh, "none") == 0)
{
_stprintf(txt2, "gfx_center_horizontal=none");
cfgfile_parse_line(prefs, txt2, 0);
}

if (strcmpi(game_detail.scr_centerv, "smart") == 0)
{
_stprintf(txt2, "gfx_center_vertical=smart");
cfgfile_parse_line(prefs, txt2, 0);
}
else if (strcmpi(game_detail.scr_centerv, "none") == 0)
{
_stprintf(txt2, "gfx_center_vertical=none");
cfgfile_parse_line(prefs, txt2, 0);
}

if (strcmpi(game_detail.scr_height, "nul") != 0)
{
_stprintf(txt2, "gfx_height=%s", game_detail.scr_height);
cfgfile_parse_line(prefs, txt2, 0);
_stprintf(txt2, "gfx_height_windowed=%s", game_detail.scr_height);
cfgfile_parse_line(prefs, txt2, 0);
_stprintf(txt2, "gfx_height_fullscreen=%s", game_detail.scr_height);
cfgfile_parse_line(prefs, txt2, 0);
}

if (strcmpi(game_detail.scr_width, "nul") != 0)
{
_stprintf(txt2, "gfx_width=%s", game_detail.scr_width);
cfgfile_parse_line(prefs, txt2, 0);
_stprintf(txt2, "gfx_width_windowed=%s", game_detail.scr_width);
cfgfile_parse_line(prefs, txt2, 0);
_stprintf(txt2, "gfx_width_fullscreen=%s", game_detail.scr_width);
cfgfile_parse_line(prefs, txt2, 0);
}

// SPRITE COLLISION
if (strcmpi(game_detail.sprites, "nul") != 0)
{
Expand Down

0 comments on commit fcc5a6c

Please # to comment.