summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-10-26 01:27:33 +0300
committerAndrei Karas <akaras@inbox.ru>2017-10-26 01:27:33 +0300
commit6bacc01ec853f91e550fbcb39f2f553eaaf44c47 (patch)
tree4aa5144745866aadd8e1e37768caedb2e592da55 /src/utils
parent03378679c6e7b5833ddca59d9aacc22a22f7654c (diff)
downloadmanaplus-6bacc01ec853f91e550fbcb39f2f553eaaf44c47.tar.gz
manaplus-6bacc01ec853f91e550fbcb39f2f553eaaf44c47.tar.bz2
manaplus-6bacc01ec853f91e550fbcb39f2f553eaaf44c47.tar.xz
manaplus-6bacc01ec853f91e550fbcb39f2f553eaaf44c47.zip
Replace some SDL2 function calls to lower level functions.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/sdl2helper.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/utils/sdl2helper.cpp b/src/utils/sdl2helper.cpp
index 68fb9cf4d..76b4b7fea 100644
--- a/src/utils/sdl2helper.cpp
+++ b/src/utils/sdl2helper.cpp
@@ -219,14 +219,18 @@ void SDL::allowScreenSaver(const bool allow)
if (allow)
{
#if SDL_VERSION_ATLEAST(2, 0, 2)
- SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
+ SDL_SetHintWithPriority(SDL_HINT_VIDEO_ALLOW_SCREENSAVER,
+ "1",
+ SDL_HINT_NORMAL);
#endif // SDL_VERSION_ATLEAST(2, 0, 2)
SDL_EnableScreenSaver();
}
else
{
#if SDL_VERSION_ATLEAST(2, 0, 2)
- SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "0");
+ SDL_SetHintWithPriority(SDL_HINT_VIDEO_ALLOW_SCREENSAVER,
+ "0",
+ SDL_HINT_NORMAL);
#endif // SDL_VERSION_ATLEAST(2, 0, 2)
SDL_DisableScreenSaver();
}
@@ -263,8 +267,9 @@ void SDL::setRendererHint(const std::string &driver)
{
if (!driver.empty())
{
- SDL_SetHint(SDL_HINT_RENDER_DRIVER,
- driver.c_str());
+ SDL_SetHintWithPriority(SDL_HINT_RENDER_DRIVER,
+ driver.c_str(),
+ SDL_HINT_NORMAL);
}
}