Skip to content

Commit

Permalink
Rename variables to match the coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
Benau committed May 17, 2024
1 parent 14c002c commit 02e540b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config/user_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ namespace UserConfigParams
PARAM_PREFIX BoolUserConfigParam m_force_legacy_device
PARAM_DEFAULT(BoolUserConfigParam(false, "force_legacy_device",
&m_video_group, "Force OpenGL 2 context, even if OpenGL 3 is available."));
PARAM_PREFIX BoolUserConfigParam split_screen_horizontally
PARAM_PREFIX BoolUserConfigParam m_split_screen_horizontally
PARAM_DEFAULT(BoolUserConfigParam(true, "split_screen_horizontally",
&m_video_group, "When playing a non-square amount of players (e.g. 2),"
" should it split horizontally (top/bottom)"));
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/irr_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ core::recti IrrDriver::getSplitscreenWindow(int window_num)
total_players = 1;
int columns = (int)(std::ceil(std::sqrt(total_players)));
int rows = (int)(std::ceil((double)(total_players) / columns));
if (UserConfigParams::split_screen_horizontally)
if (UserConfigParams::m_split_screen_horizontally)
std::swap(columns, rows);
// Calculate the base dimensions of each viewport
Expand Down
4 changes: 2 additions & 2 deletions src/states_screens/options/options_screen_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void OptionsScreenDisplay::init()
// ---- splitscreen mode
GUIEngine::SpinnerWidget* splitscreen_method = getWidget<GUIEngine::SpinnerWidget>("splitscreen_method");
assert( splitscreen_method != NULL );
splitscreen_method->setValue(UserConfigParams::split_screen_horizontally ? 1 : 0);
splitscreen_method->setValue(UserConfigParams::m_split_screen_horizontally ? 1 : 0);
} // init

// --------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -406,7 +406,7 @@ void OptionsScreenDisplay::eventCallback(Widget* widget, const std::string& name
{
GUIEngine::SpinnerWidget* splitscreen_method = getWidget<GUIEngine::SpinnerWidget>("splitscreen_method");
assert( splitscreen_method != NULL );
UserConfigParams::split_screen_horizontally = (splitscreen_method->getValue() == 1);
UserConfigParams::m_split_screen_horizontally = (splitscreen_method->getValue() == 1);
if (World::getWorld())
{
for (unsigned i = 0; i < Camera::getNumCameras(); i++)
Expand Down

0 comments on commit 02e540b

Please sign in to comment.