SDL :
- The filter is now stored as a decimal value in the config file instead of an hexadecimal value as it was undocumented and confused users. Thanks to fhorse for the patch. - Removed an unused variable
This commit is contained in:
parent
2a2c0d6918
commit
57b7512db9
|
@ -420,6 +420,13 @@ u32 sdlFromHex(char *s)
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 sdlFromDec(char *s)
|
||||||
|
{
|
||||||
|
u32 value;
|
||||||
|
sscanf(s, "%u", &value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __MSC__
|
#ifdef __MSC__
|
||||||
#define stat _stat
|
#define stat _stat
|
||||||
#define S_IFDIR _S_IFDIR
|
#define S_IFDIR _S_IFDIR
|
||||||
|
@ -740,7 +747,7 @@ void sdlReadPreferences(FILE *f)
|
||||||
} else if(!strcmp(key, "gbBiosFile")) {
|
} else if(!strcmp(key, "gbBiosFile")) {
|
||||||
strcpy(gbBiosFileName, value);
|
strcpy(gbBiosFileName, value);
|
||||||
} else if(!strcmp(key, "filter")) {
|
} else if(!strcmp(key, "filter")) {
|
||||||
filter = (Filter)sdlFromHex(value);
|
filter = (Filter)sdlFromDec(value);
|
||||||
if(filter < kStretch1x || filter >= kInvalidFilter)
|
if(filter < kStretch1x || filter >= kInvalidFilter)
|
||||||
filter = kStretch2x;
|
filter = kStretch2x;
|
||||||
} else if(!strcmp(key, "disableStatus")) {
|
} else if(!strcmp(key, "disableStatus")) {
|
||||||
|
@ -1739,7 +1746,6 @@ void sdlPollEvents()
|
||||||
case SDLK_f:
|
case SDLK_f:
|
||||||
if(!(event.key.keysym.mod & MOD_NOCTRL) &&
|
if(!(event.key.keysym.mod & MOD_NOCTRL) &&
|
||||||
(event.key.keysym.mod & KMOD_CTRL)) {
|
(event.key.keysym.mod & KMOD_CTRL)) {
|
||||||
int flags = 0;
|
|
||||||
fullscreen = !fullscreen;
|
fullscreen = !fullscreen;
|
||||||
sdlInitVideo();
|
sdlInitVideo();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue