summaryrefslogtreecommitdiff
path: root/src/defaults.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-06 23:15:18 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-06 23:15:18 +0300
commit4972739b76c2cbe9fe587e591431632b9e3cb547 (patch)
tree6f680ee6e09754cb4bb9924036f675754a85a426 /src/defaults.cpp
parent2323c3ab4083af456a2251518c36220e28700186 (diff)
downloadplus-4972739b76c2cbe9fe587e591431632b9e3cb547.tar.gz
plus-4972739b76c2cbe9fe587e591431632b9e3cb547.tar.bz2
plus-4972739b76c2cbe9fe587e591431632b9e3cb547.tar.xz
plus-4972739b76c2cbe9fe587e591431632b9e3cb547.zip
Set onscreen default buttons size depend on screen resolution.
Diffstat (limited to 'src/defaults.cpp')
-rw-r--r--src/defaults.cpp18
1 files changed, 16 insertions, 2 deletions
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;