diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-06 23:15:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-06 23:15:18 +0300 |
commit | 4972739b76c2cbe9fe587e591431632b9e3cb547 (patch) | |
tree | 6f680ee6e09754cb4bb9924036f675754a85a426 /src/defaults.cpp | |
parent | 2323c3ab4083af456a2251518c36220e28700186 (diff) | |
download | manaplus-4972739b76c2cbe9fe587e591431632b9e3cb547.tar.gz manaplus-4972739b76c2cbe9fe587e591431632b9e3cb547.tar.bz2 manaplus-4972739b76c2cbe9fe587e591431632b9e3cb547.tar.xz manaplus-4972739b76c2cbe9fe587e591431632b9e3cb547.zip |
Set onscreen default buttons size depend on screen resolution.
Diffstat (limited to 'src/defaults.cpp')
-rw-r--r-- | src/defaults.cpp | 18 |
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; |