mirror of
https://github.com/LIV2/WinUAE.git
synced 2025-12-06 00:12:52 +00:00
Force display recalc when filter profile is loaded.
This commit is contained in:
parent
27c2cfd19a
commit
51f0fb160a
10
cfgfile.cpp
10
cfgfile.cpp
@ -9899,9 +9899,13 @@ void cfgfile_get_shader_config(struct uae_prefs *p, int rtg)
|
||||
}
|
||||
#endif
|
||||
|
||||
void set_config_changed (void)
|
||||
void set_config_changed(int flags)
|
||||
{
|
||||
if (!config_changed) {
|
||||
config_changed_flags = 0;
|
||||
}
|
||||
config_changed = 1;
|
||||
config_changed_flags |= flags;
|
||||
}
|
||||
|
||||
void config_check_vsync (void)
|
||||
@ -9914,8 +9918,10 @@ void config_check_vsync (void)
|
||||
}
|
||||
#endif
|
||||
config_changed++;
|
||||
if (config_changed >= 3)
|
||||
if (config_changed >= 3) {
|
||||
config_changed = 0;
|
||||
config_changed_flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -951,9 +951,9 @@ struct uae_prefs {
|
||||
int input_device_match_mask;
|
||||
};
|
||||
|
||||
extern int config_changed;
|
||||
extern void config_check_vsync (void);
|
||||
extern void set_config_changed (void);
|
||||
extern int config_changed, config_changed_flags;
|
||||
extern void config_check_vsync(void);
|
||||
extern void set_config_changed(int flags = 0);
|
||||
|
||||
/* Contains the filename of .uaerc */
|
||||
extern TCHAR optionsfile[];
|
||||
|
||||
@ -4254,6 +4254,7 @@ int handle_custom_event (const TCHAR *custom, int append)
|
||||
}
|
||||
if (!_tcsicmp (p, _T("no_config_check"))) {
|
||||
config_changed = 0;
|
||||
config_changed_flags = 0;
|
||||
maybe_config_changed = false;
|
||||
} else if (!_tcsicmp (p, _T("do_config_check"))) {
|
||||
set_config_changed ();
|
||||
|
||||
2
main.cpp
2
main.cpp
@ -57,7 +57,7 @@
|
||||
long int version = 256 * 65536L * UAEMAJOR + 65536L * UAEMINOR + UAESUBREV;
|
||||
|
||||
struct uae_prefs currprefs, changed_prefs;
|
||||
int config_changed;
|
||||
int config_changed, config_changed_flags;
|
||||
|
||||
bool no_gui = 0, quit_to_gui = 0;
|
||||
bool cloanto_rom = 0;
|
||||
|
||||
@ -2126,6 +2126,9 @@ int check_prefs_changed_gfx(void)
|
||||
if (!config_changed && !display_change_requested)
|
||||
return 0;
|
||||
|
||||
c |= config_changed_flags;
|
||||
config_changed_flags = 0;
|
||||
|
||||
c |= currprefs.win32_statusbar != changed_prefs.win32_statusbar ? 512 : 0;
|
||||
|
||||
for (int i = 0; i < MAX_AMIGADISPLAYS; i++) {
|
||||
|
||||
@ -20398,7 +20398,7 @@ static const int filtertypes[] = {
|
||||
0, 0, 0, 0,
|
||||
-1
|
||||
};
|
||||
static void *filtervars[] = {
|
||||
static void *filtervars_wp[] = {
|
||||
&workprefs.gf[0].gfx_filter, &workprefs.gf[0].gfx_filter_filtermodeh,
|
||||
&workprefs.gf[0].gfx_filter_vert_zoom, &workprefs.gf[0].gfx_filter_horiz_zoom,
|
||||
&workprefs.gf[0].gfx_filter_vert_zoom_mult, &workprefs.gf[0].gfx_filter_horiz_zoom_mult,
|
||||
@ -20415,7 +20415,7 @@ static void *filtervars[] = {
|
||||
&workprefs.gf[0].gfx_filter_left_border, &workprefs.gf[0].gfx_filter_right_border, &workprefs.gf[0].gfx_filter_top_border, &workprefs.gf[0].gfx_filter_bottom_border,
|
||||
NULL
|
||||
};
|
||||
static void *filtervars2[] = {
|
||||
static void *filtervars_cp[] = {
|
||||
NULL, &currprefs.gf[0].gfx_filter_filtermodeh,
|
||||
&currprefs.gf[0].gfx_filter_vert_zoom, &currprefs.gf[0].gfx_filter_horiz_zoom,
|
||||
&currprefs.gf[0].gfx_filter_vert_zoom_mult, &currprefs.gf[0].gfx_filter_horiz_zoom_mult,
|
||||
@ -20912,7 +20912,7 @@ static void filter_preset (HWND hDlg, WPARAM wParam)
|
||||
ok = 1;
|
||||
} else {
|
||||
TCHAR *p = tmp2;
|
||||
for (i = 0; filtervars[i]; i++) {
|
||||
for (i = 0; filtervars_wp[i]; i++) {
|
||||
if (i > 0) {
|
||||
_tcscat (p, _T(","));
|
||||
p++;
|
||||
@ -20925,15 +20925,15 @@ static void filter_preset (HWND hDlg, WPARAM wParam)
|
||||
|
||||
if (wParam == IDC_FILTERPRESETSAVE && userfilter && fkey) {
|
||||
TCHAR *p = tmp2;
|
||||
for (i = 0; filtervars[i]; i++) {
|
||||
for (i = 0; filtervars_wp[i]; i++) {
|
||||
if (i > 0) {
|
||||
_tcscat (p, _T(","));
|
||||
p++;
|
||||
}
|
||||
if (filtertypes[i])
|
||||
_stprintf (p, _T("%f"), *((float*)filtervars[i]));
|
||||
_stprintf (p, _T("%f"), *((float*)filtervars_wp[i]));
|
||||
else
|
||||
_stprintf (p, _T("%d"), *((int*)filtervars[i]));
|
||||
_stprintf (p, _T("%d"), *((int*)filtervars_wp[i]));
|
||||
p += _tcslen (p);
|
||||
}
|
||||
if (ok == 0) {
|
||||
@ -20957,16 +20957,16 @@ static void filter_preset (HWND hDlg, WPARAM wParam)
|
||||
_tcscat (s, _T(","));
|
||||
t = _tcschr (s, ',');
|
||||
*t++ = 0;
|
||||
for (i = 0; filtervars[i]; i++) {
|
||||
for (i = 0; filtervars_wp[i]; i++) {
|
||||
if (filtertypes[i])
|
||||
*((float*)filtervars[i]) = (float)_tstof (s);
|
||||
*((float*)filtervars_wp[i]) = (float)_tstof (s);
|
||||
else
|
||||
*((int*)filtervars[i]) = _tstol (s);
|
||||
if (filtervars2[i]) {
|
||||
*((int*)filtervars_wp[i]) = _tstol (s);
|
||||
if (filtervars_cp[i]) {
|
||||
if (filtertypes[i])
|
||||
*((float*)filtervars2[i]) = *((float*)filtervars[i]);
|
||||
*((float*)filtervars_cp[i]) = *((float*)filtervars_wp[i]);
|
||||
else
|
||||
*((int*)filtervars2[i]) = *((int*)filtervars[i]);
|
||||
*((int*)filtervars_cp[i]) = *((int*)filtervars_wp[i]);
|
||||
}
|
||||
s = t;
|
||||
t = _tcschr (s, ',');
|
||||
@ -20974,6 +20974,7 @@ static void filter_preset (HWND hDlg, WPARAM wParam)
|
||||
break;
|
||||
*t++ = 0;
|
||||
}
|
||||
set_config_changed(4);
|
||||
}
|
||||
}
|
||||
end:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user