From 4972739b76c2cbe9fe587e591431632b9e3cb547 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 6 Feb 2013 23:15:18 +0300 Subject: Set onscreen default buttons size depend on screen resolution. --- src/defaults.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/defaults.cpp') diff --git a/src/defaults.cpp b/src/defaults.cpp index 5f6de0282..7ca57cfe8 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -287,8 +287,6 @@ DefaultsData* getConfigDefaults() AddDEF("allowscreensaver", false); AddDEF("debugOpenGL", 0); AddDEF("protectChatFocus", true); - AddDEF("screenButtonsSize", 1); - AddDEF("screenJoystickSize", 1); #if defined(__APPLE__) AddDEF("enableGamma", false); #else @@ -309,6 +307,22 @@ DefaultsData* getConfigDefaults() return configData; } +void getConfigDefaults2(DefaultsData *const configData) +{ + if (!configData) + return; + if (mainGraphics->getHeight() < 480) + { + AddDEF("screenButtonsSize", 0); + AddDEF("screenJoystickSize", 0); + } + else + { + AddDEF("screenButtonsSize", 1); + AddDEF("screenJoystickSize", 1); + } +} + DefaultsData* getBrandingDefaults() { DefaultsData *const configData = new DefaultsData; -- cgit v1.2.3-70-g09d2