diff options
author | Darkvater <darkvater@openttd.org> | 2006-02-20 23:01:58 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-02-20 23:01:58 +0000 |
commit | c7e34bd103d4bf4fd141e437b1a60e5ae34d909e (patch) | |
tree | 14504481d7169fc1136b03b9f14ac7de6aa37497 | |
parent | 8104a720b9ca713b5492dabe48fadde38d417566 (diff) | |
download | openttd-c7e34bd103d4bf4fd141e437b1a60e5ae34d909e.tar.xz |
(svn r3640) - Remove win32-only variables from variables.h and put them into win32_v.c. Also ifdef the win32 specific configuration file settings.
-rw-r--r-- | settings.c | 8 | ||||
-rw-r--r-- | variables.h | 4 | ||||
-rw-r--r-- | video/win32_v.c | 5 |
3 files changed, 13 insertions, 4 deletions
diff --git a/settings.c b/settings.c index b0f5ba62d..e64907c02 100644 --- a/settings.c +++ b/settings.c @@ -800,6 +800,11 @@ static const SettingDesc music_settings[] = { {NULL, 0, NULL, NULL, NULL} }; +/* win32_v.c only settings */ +#ifdef WIN32 +extern bool _force_full_redraw, _double_size; +extern uint _display_hz, _fullscreen_bpp; + static const SettingDesc win32_settings[] = { {"display_hz", SDT_UINT, (void*)0, &_display_hz, NULL}, {"force_full_redraw", SDT_BOOL, (void*)false, &_force_full_redraw, NULL}, @@ -807,6 +812,7 @@ static const SettingDesc win32_settings[] = { {"double_size", SDT_BOOL, (void*)false, &_double_size, NULL}, {NULL, 0, NULL, NULL, NULL} }; +#endif /* WIN32 */ static const SettingDesc misc_settings[] = { {"display_opt", SDT_MANYOFMANY | SDT_UINT8, (void*)(DO_SHOW_TOWN_NAMES|DO_SHOW_STATION_NAMES|DO_SHOW_SIGNS|DO_FULL_ANIMATION|DO_FULL_DETAIL|DO_TRANS_BUILDINGS|DO_WAYPOINTS), &_display_opt, "SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION|TRANS_BUILDINGS|FULL_DETAIL|WAYPOINTS"}, @@ -1060,7 +1066,9 @@ typedef void SettingDescProc(IniFile *ini, const SettingDesc *desc, const char * static void HandleSettingDescs(IniFile *ini, SettingDescProc *proc) { proc(ini, misc_settings, "misc"); +#ifdef WIN32 proc(ini, win32_settings, "win32"); +#endif /* WIN32 */ #ifdef ENABLE_NETWORK proc(ini, network_settings, "network"); #endif /* ENABLE_NETWORK */ diff --git a/variables.h b/variables.h index 1d0b4802d..5e0dda8ac 100644 --- a/variables.h +++ b/variables.h @@ -280,10 +280,6 @@ VARDEF bool _shift_pressed; // Is Alt pressed? VARDEF byte _dirkeys; // 1=left, 2=up, 4=right, 8=down VARDEF bool _fullscreen; -VARDEF bool _double_size; -VARDEF uint _display_hz; -VARDEF bool _force_full_redraw; -VARDEF uint _fullscreen_bpp; VARDEF bool _fast_forward; VARDEF bool _rightclick_emulate; diff --git a/video/win32_v.c b/video/win32_v.c index 989d7ff4a..01e3c0cd8 100644 --- a/video/win32_v.c +++ b/video/win32_v.c @@ -27,6 +27,11 @@ static struct { bool running; } _wnd; +bool _force_full_redraw; +bool _double_size; +uint _display_hz; +uint _fullscreen_bpp; + static void MakePalette(void) { LOGPALETTE *pal; |