Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add display refresh rate game option #8813

Merged
merged 1 commit into from Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lang/english.txt
Expand Up @@ -1021,6 +1021,14 @@ STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_NORMAL :Normal
STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_2X_ZOOM :Double size
STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_4X_ZOOM :Quad size

STR_GAME_OPTIONS_GRAPHICS :{BLACK}Graphics

STR_GAME_OPTIONS_REFRESH_RATE :{BLACK}Display refresh rate
STR_GAME_OPTIONS_REFRESH_RATE_TOOLTIP :{BLACK}Select the screen refresh rate to use
STR_GAME_OPTIONS_REFRESH_RATE_OTHER :other
STR_GAME_OPTIONS_REFRESH_RATE_ITEM :{NUM}Hz
STR_GAME_OPTIONS_REFRESH_RATE_WARNING :{WHITE}Refresh rates higher than 60Hz might impact performance.

STR_GAME_OPTIONS_BASE_GRF :{BLACK}Base graphics set
STR_GAME_OPTIONS_BASE_GRF_TOOLTIP :{BLACK}Select the base graphics set to use
STR_GAME_OPTIONS_BASE_GRF_STATUS :{RED}{NUM} missing/corrupted file{P "" s}
Expand Down
108 changes: 80 additions & 28 deletions src/settings_gui.cpp
Expand Up @@ -38,8 +38,10 @@
#include "video/video_driver.hpp"

#include <vector>
#include <iterator>

#include "safeguards.h"
#include "video/video_driver.hpp"


static const StringID _autosave_dropdown[] = {
Expand Down Expand Up @@ -140,6 +142,22 @@ void ShowBaseSetTextfileWindow(TextfileType file_type, const TBaseSet* baseset,
new BaseSetTextfileWindow<TBaseSet>(file_type, baseset, content_type);
}

std::set<int> _refresh_rates = { 30, 60, 75, 90, 100, 120, 144, 240 };

/**
* Add the refresh rate from the config and the refresh rates from all the monitors to
* our list of refresh rates shown in the GUI.
*/
static void AddRefreshRatesAndSelect()
{
/* Add the refresh rate as selected in the config. */
_refresh_rates.insert(_settings_client.gui.refresh_rate);

/* Add all the refresh rates of all monitors connected to the machine. */
std::vector<int> monitorRates = VideoDriver::GetInstance()->GetListOfMonitorRefreshRates();
std::copy(monitorRates.begin(), monitorRates.end(), std::inserter(_refresh_rates, _refresh_rates.end()));
}

struct GameOptionsWindow : Window {
GameSettings *opt;
bool reload;
Expand All @@ -149,6 +167,8 @@ struct GameOptionsWindow : Window {
this->opt = &GetGameSettings();
this->reload = false;

AddRefreshRatesAndSelect();

this->InitNested(WN_GAME_OPTIONS_GAME_OPTIONS);
this->OnInvalidateData(0);
}
Expand Down Expand Up @@ -215,6 +235,16 @@ struct GameOptionsWindow : Window {
}
break;

case WID_GO_REFRESH_RATE_DROPDOWN: // Setup refresh rate dropdown
for (auto it = _refresh_rates.begin(); it != _refresh_rates.end(); it++) {
auto i = std::distance(_refresh_rates.begin(), it);
if (*it == _settings_client.gui.refresh_rate) *selected_index = i;
auto item = new DropDownListParamStringItem(STR_GAME_OPTIONS_REFRESH_RATE_ITEM, i, false);
item->SetParam(0, *it);
list.emplace_back(item);
spnda marked this conversation as resolved.
Show resolved Hide resolved
}
break;

case WID_GO_GUI_ZOOM_DROPDOWN: {
*selected_index = _gui_zoom_cfg != ZOOM_LVL_CFG_AUTO ? ZOOM_LVL_OUT_4X - _gui_zoom + 1 : 0;
const StringID *items = _gui_zoom_dropdown;
Expand Down Expand Up @@ -252,17 +282,18 @@ struct GameOptionsWindow : Window {
void SetStringParameters(int widget) const override
{
switch (widget) {
case WID_GO_CURRENCY_DROPDOWN: SetDParam(0, _currency_specs[this->opt->locale.currency].name); break;
case WID_GO_AUTOSAVE_DROPDOWN: SetDParam(0, _autosave_dropdown[_settings_client.gui.autosave]); break;
case WID_GO_LANG_DROPDOWN: SetDParamStr(0, _current_language->own_name); break;
case WID_GO_RESOLUTION_DROPDOWN: SetDParam(0, GetCurRes() == _resolutions.size() ? STR_GAME_OPTIONS_RESOLUTION_OTHER : SPECSTR_RESOLUTION_START + GetCurRes()); break;
case WID_GO_GUI_ZOOM_DROPDOWN: SetDParam(0, _gui_zoom_dropdown[_gui_zoom_cfg != ZOOM_LVL_CFG_AUTO ? ZOOM_LVL_OUT_4X - _gui_zoom_cfg + 1 : 0]); break;
case WID_GO_FONT_ZOOM_DROPDOWN: SetDParam(0, _font_zoom_dropdown[_font_zoom_cfg != ZOOM_LVL_CFG_AUTO ? ZOOM_LVL_OUT_4X - _font_zoom_cfg + 1 : 0]); break;
case WID_GO_BASE_GRF_DROPDOWN: SetDParamStr(0, BaseGraphics::GetUsedSet()->name.c_str()); break;
case WID_GO_BASE_GRF_STATUS: SetDParam(0, BaseGraphics::GetUsedSet()->GetNumInvalid()); break;
case WID_GO_BASE_SFX_DROPDOWN: SetDParamStr(0, BaseSounds::GetUsedSet()->name.c_str()); break;
case WID_GO_BASE_MUSIC_DROPDOWN: SetDParamStr(0, BaseMusic::GetUsedSet()->name.c_str()); break;
case WID_GO_BASE_MUSIC_STATUS: SetDParam(0, BaseMusic::GetUsedSet()->GetNumInvalid()); break;
case WID_GO_CURRENCY_DROPDOWN: SetDParam(0, _currency_specs[this->opt->locale.currency].name); break;
case WID_GO_AUTOSAVE_DROPDOWN: SetDParam(0, _autosave_dropdown[_settings_client.gui.autosave]); break;
case WID_GO_LANG_DROPDOWN: SetDParamStr(0, _current_language->own_name); break;
case WID_GO_RESOLUTION_DROPDOWN: SetDParam(0, GetCurRes() == _resolutions.size() ? STR_GAME_OPTIONS_RESOLUTION_OTHER : SPECSTR_RESOLUTION_START + GetCurRes()); break;
case WID_GO_GUI_ZOOM_DROPDOWN: SetDParam(0, _gui_zoom_dropdown[_gui_zoom_cfg != ZOOM_LVL_CFG_AUTO ? ZOOM_LVL_OUT_4X - _gui_zoom_cfg + 1 : 0]); break;
case WID_GO_FONT_ZOOM_DROPDOWN: SetDParam(0, _font_zoom_dropdown[_font_zoom_cfg != ZOOM_LVL_CFG_AUTO ? ZOOM_LVL_OUT_4X - _font_zoom_cfg + 1 : 0]); break;
case WID_GO_BASE_GRF_DROPDOWN: SetDParamStr(0, BaseGraphics::GetUsedSet()->name.c_str()); break;
case WID_GO_BASE_GRF_STATUS: SetDParam(0, BaseGraphics::GetUsedSet()->GetNumInvalid()); break;
case WID_GO_BASE_SFX_DROPDOWN: SetDParamStr(0, BaseSounds::GetUsedSet()->name.c_str()); break;
case WID_GO_BASE_MUSIC_DROPDOWN: SetDParamStr(0, BaseMusic::GetUsedSet()->name.c_str()); break;
case WID_GO_BASE_MUSIC_STATUS: SetDParam(0, BaseMusic::GetUsedSet()->GetNumInvalid()); break;
case WID_GO_REFRESH_RATE_DROPDOWN: SetDParam(0, _settings_client.gui.refresh_rate); break;
}
}

Expand Down Expand Up @@ -451,6 +482,16 @@ struct GameOptionsWindow : Window {
}
break;

case WID_GO_REFRESH_RATE_DROPDOWN: {
_settings_client.gui.refresh_rate = *std::next(_refresh_rates.begin(), index);
if (_settings_client.gui.refresh_rate > 60) {
/* Show warning to the user that this refresh rate might not be suitable on
* larger maps with many NewGRFs and vehicles. */
ShowErrorMessage(STR_GAME_OPTIONS_REFRESH_RATE_WARNING, INVALID_STRING_ID, WL_INFO);
}
break;
}

case WID_GO_GUI_ZOOM_DROPDOWN: {
int8 new_zoom = index > 0 ? ZOOM_LVL_OUT_4X - index + 1 : ZOOM_LVL_CFG_AUTO;
if (new_zoom != _gui_zoom_cfg) {
Expand Down Expand Up @@ -528,36 +569,47 @@ static const NWidgetPart _nested_game_options_widgets[] = {
NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_AUTOSAVE_FRAME, STR_NULL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_AUTOSAVE_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP), SetFill(1, 0),
EndContainer(),
NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_RESOLUTION, STR_NULL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_RESOLUTION_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_RESOLUTION_TOOLTIP), SetFill(1, 0), SetPadding(0, 0, 3, 0),
NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0), SetPadding(0, 0, 3, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_FULLSCREEN, STR_NULL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_GO_FULLSCREEN_BUTTON), SetMinimalSize(21, 9), SetDataTip(STR_EMPTY, STR_GAME_OPTIONS_FULLSCREEN_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_VIDEO_ACCELERATION, STR_NULL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_GO_VIDEO_ACCEL_BUTTON), SetMinimalSize(21, 9), SetDataTip(STR_EMPTY, STR_GAME_OPTIONS_VIDEO_ACCELERATION_TOOLTIP),
EndContainer(),
NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_GUI_ZOOM_FRAME, STR_NULL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_GUI_ZOOM_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_TOOLTIP), SetFill(1, 0),
EndContainer(),
NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME, STR_NULL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_CURRENCY_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_CURRENCY_UNITS_DROPDOWN_TOOLTIP), SetFill(1, 0),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 0), SetFill(0, 1),
EndContainer(),

NWidget(NWID_VERTICAL), SetPIP(0, 6, 0),
NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_LANGUAGE, STR_NULL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_LANG_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_RAW_STRING, STR_GAME_OPTIONS_LANGUAGE_TOOLTIP), SetFill(1, 0),
EndContainer(),
NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME, STR_NULL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_CURRENCY_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_CURRENCY_UNITS_DROPDOWN_TOOLTIP), SetFill(1, 0),
EndContainer(),
NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_GUI_ZOOM_FRAME, STR_NULL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_GUI_ZOOM_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_TOOLTIP), SetFill(1, 0),
EndContainer(),
NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_FONT_ZOOM, STR_NULL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_FONT_ZOOM_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_TOOLTIP), SetFill(1, 0),
EndContainer(),
EndContainer(),
EndContainer(),

NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_GRAPHICS, STR_NULL), SetPadding(0, 10, 0, 10),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_VERTICAL),
NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_RESOLUTION, STR_NULL), SetPadding(0, 0, 2, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_REFRESH_RATE, STR_NULL), SetPadding(0, 0, 2, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_FULLSCREEN, STR_NULL), SetPadding(0, 0, 2, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_VIDEO_ACCELERATION, STR_NULL),
EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_RESOLUTION_DROPDOWN), SetMinimalSize(100, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_RESOLUTION_TOOLTIP), SetFill(1, 0), SetPadding(0, 0, 2, 0),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_REFRESH_RATE_DROPDOWN), SetMinimalSize(100, 12), SetDataTip(STR_GAME_OPTIONS_REFRESH_RATE_ITEM, STR_GAME_OPTIONS_REFRESH_RATE_TOOLTIP), SetFill(1, 0), SetPadding(0, 0, 2, 0),
NWidget(NWID_HORIZONTAL), SetPadding(0, 0, 2, 0),
NWidget(NWID_SPACER), SetMinimalSize(1, 0), SetFill(1, 0),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_GO_FULLSCREEN_BUTTON), SetMinimalSize(21, 9), SetDataTip(STR_EMPTY, STR_GAME_OPTIONS_FULLSCREEN_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SPACER), SetMinimalSize(1, 0), SetFill(1, 0),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_GO_VIDEO_ACCEL_BUTTON), SetMinimalSize(21, 9), SetDataTip(STR_EMPTY, STR_GAME_OPTIONS_VIDEO_ACCELERATION_TOOLTIP),
EndContainer(),
EndContainer(),
EndContainer(),
EndContainer(),

NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_BASE_GRF, STR_NULL), SetPadding(0, 10, 0, 10),
NWidget(NWID_HORIZONTAL), SetPIP(0, 30, 0),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GO_BASE_GRF_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_RAW_STRING, STR_GAME_OPTIONS_BASE_GRF_TOOLTIP),
Expand Down
10 changes: 10 additions & 0 deletions src/video/allegro_v.cpp
Expand Up @@ -236,6 +236,16 @@ bool VideoDriver_Allegro::ClaimMousePointer()
return true;
}

std::vector<int> VideoDriver_Allegro::GetListOfMonitorRefreshRates()
{
std::vector<int> rates = {};

int refresh_rate = get_refresh_rate();
if (refresh_rate != 0) rates.push_back(refresh_rate);

return rates;
}

struct AllegroVkMapping {
uint16 vk_from;
byte vk_count;
Expand Down
2 changes: 2 additions & 0 deletions src/video/allegro_v.h
Expand Up @@ -31,6 +31,8 @@ class VideoDriver_Allegro : public VideoDriver {

bool ClaimMousePointer() override;

std::vector<int> GetListOfMonitorRefreshRates() override;

const char *GetName() const override { return "allegro"; }

protected:
Expand Down
2 changes: 2 additions & 0 deletions src/video/cocoa/cocoa_v.h
Expand Up @@ -47,6 +47,8 @@ class VideoDriver_Cocoa : public VideoDriver {

void EditBoxLostFocus() override;

std::vector<int> GetListOfMonitorRefreshRates() override;

/* --- The following methods should be private, but can't be due to Obj-C limitations. --- */

void MainLoopReal();
Expand Down
25 changes: 25 additions & 0 deletions src/video/cocoa/cocoa_v.mm
Expand Up @@ -43,6 +43,7 @@

#import <sys/param.h> /* for MAXPATHLEN */
#import <sys/time.h> /* gettimeofday */
#include <array>

/**
* Important notice regarding all modifications!!!!!!!
Expand Down Expand Up @@ -228,6 +229,30 @@
HandleTextInput(nullptr, true);
}

/**
* Get refresh rates of all connected monitors.
*/
std::vector<int> VideoDriver_Cocoa::GetListOfMonitorRefreshRates()
{
std::vector<int> rates{};

if (MacOSVersionIsAtLeast(10, 6, 0)) {
std::array<CGDirectDisplayID, 16> displays;

uint32_t count = 0;
CGGetActiveDisplayList(displays.size(), displays.data(), &count);

for (uint32_t i = 0; i < count; i++) {
CGDisplayModeRef mode = CGDisplayCopyDisplayMode(displays[i]);
int rate = (int)CGDisplayModeGetRefreshRate(mode);
if (rate > 0) rates.push_back(rate);
CGDisplayModeRelease(mode);
}
}

return rates;
}

/**
* Get the resolution of the main screen.
*/
Expand Down
11 changes: 11 additions & 0 deletions src/video/sdl2_v.cpp
Expand Up @@ -237,6 +237,17 @@ void VideoDriver_SDL_Base::EditBoxLostFocus()
}
}

std::vector<int> VideoDriver_SDL_Base::GetListOfMonitorRefreshRates()
{
std::vector<int> rates = {};
for (int i = 0; i < SDL_GetNumVideoDisplays(); i++) {
SDL_DisplayMode mode = {};
if (SDL_GetDisplayMode(i, 0, &mode) != 0) continue;
if (mode.refresh_rate != 0) rates.push_back(mode.refresh_rate);
}
return rates;
}


struct SDLVkMapping {
SDL_Keycode vk_from;
Expand Down
2 changes: 2 additions & 0 deletions src/video/sdl2_v.h
Expand Up @@ -39,6 +39,8 @@ class VideoDriver_SDL_Base : public VideoDriver {

void EditBoxLostFocus() override;

std::vector<int> GetListOfMonitorRefreshRates() override;

const char *GetName() const override { return "sdl"; }

protected:
Expand Down
9 changes: 9 additions & 0 deletions src/video/video_driver.hpp
Expand Up @@ -149,6 +149,15 @@ class VideoDriver : public Driver {
*/
virtual void EditBoxGainedFocus() {}

/**
* Get a list of refresh rates of each available monitor.
* @return A vector of the refresh rates of all available monitors.
*/
virtual std::vector<int> GetListOfMonitorRefreshRates()
{
return {};
}

/**
* Get a suggested default GUI zoom taking screen DPI into account.
*/
Expand Down
21 changes: 21 additions & 0 deletions src/video/win32_v.cpp
Expand Up @@ -916,6 +916,27 @@ void VideoDriver_Win32Base::EditBoxLostFocus()
SetCandidatePos(this->main_wnd);
}

std::vector<int> VideoDriver_Win32Base::GetListOfMonitorRefreshRates()
{
std::vector<int> rates = {};
EnumDisplayMonitors(nullptr, nullptr, [](HMONITOR hMonitor, HDC hDC, LPRECT rc, LPARAM data) -> BOOL {
spnda marked this conversation as resolved.
Show resolved Hide resolved
auto &list = *reinterpret_cast<std::vector<int>*>(data);

MONITORINFOEX monitorInfo = {};
monitorInfo.cbSize = sizeof(MONITORINFOEX);
GetMonitorInfo(hMonitor, &monitorInfo);

DEVMODE devMode = {};
spnda marked this conversation as resolved.
Show resolved Hide resolved
devMode.dmSize = sizeof(DEVMODE);
devMode.dmDriverExtra = 0;
EnumDisplaySettings(monitorInfo.szDevice, ENUM_CURRENT_SETTINGS, &devMode);

if (devMode.dmDisplayFrequency != 0) list.push_back(devMode.dmDisplayFrequency);
return true;
}, reinterpret_cast<LPARAM>(&rates));
return rates;
}

Dimension VideoDriver_Win32Base::GetScreenSize() const
{
return { static_cast<uint>(GetSystemMetrics(SM_CXSCREEN)), static_cast<uint>(GetSystemMetrics(SM_CYSCREEN)) };
Expand Down
2 changes: 2 additions & 0 deletions src/video/win32_v.h
Expand Up @@ -33,6 +33,8 @@ class VideoDriver_Win32Base : public VideoDriver {

void EditBoxLostFocus() override;

std::vector<int> GetListOfMonitorRefreshRates() override;

protected:
HWND main_wnd; ///< Handle to system window.
bool fullscreen; ///< Whether to use (true) fullscreen mode.
Expand Down
1 change: 1 addition & 0 deletions src/widgets/settings_widget.h
Expand Up @@ -33,6 +33,7 @@ enum GameOptionsWidgets {
WID_GO_BASE_MUSIC_DESCRIPTION = WID_GO_BASE_MUSIC_TEXTFILE + TFT_END, ///< Description of selected base music set.
WID_GO_FONT_ZOOM_DROPDOWN, ///< Dropdown for the font zoom level.
WID_GO_VIDEO_ACCEL_BUTTON, ///< Toggle for video acceleration.
WID_GO_REFRESH_RATE_DROPDOWN, ///< Dropdown for all available refresh rates.
};

/** Widgets of the #GameSettingsWindow class. */
Expand Down