mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Renamed the fullscreen type "normal" to "exclusive".
--HG-- branch : minor
This commit is contained in:
@@ -40,7 +40,7 @@ void Window::swapBuffers()
|
||||
|
||||
WindowSettings::WindowSettings()
|
||||
: fullscreen(false)
|
||||
, fstype(Window::FULLSCREEN_TYPE_NORMAL)
|
||||
, fstype(Window::FULLSCREEN_TYPE_EXCLUSIVE)
|
||||
, vsync(true)
|
||||
, msaa(0)
|
||||
, resizable(false)
|
||||
@@ -104,7 +104,7 @@ StringMap<Window::Setting, Window::SETTING_MAX_ENUM> Window::settings(Window::se
|
||||
|
||||
StringMap<Window::FullscreenType, Window::FULLSCREEN_TYPE_MAX_ENUM>::Entry Window::fullscreenTypeEntries[] =
|
||||
{
|
||||
{"normal", Window::FULLSCREEN_TYPE_NORMAL},
|
||||
{"exclusive", Window::FULLSCREEN_TYPE_EXCLUSIVE},
|
||||
{"desktop", Window::FULLSCREEN_TYPE_DESKTOP},
|
||||
};
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
enum FullscreenType
|
||||
{
|
||||
FULLSCREEN_TYPE_NORMAL,
|
||||
FULLSCREEN_TYPE_EXCLUSIVE,
|
||||
FULLSCREEN_TYPE_DESKTOP,
|
||||
FULLSCREEN_TYPE_MAX_ENUM
|
||||
};
|
||||
@@ -183,7 +183,7 @@ struct WindowSettings
|
||||
WindowSettings();
|
||||
|
||||
bool fullscreen; // = false
|
||||
Window::FullscreenType fstype; // = FULLSCREEN_TYPE_NORMAL
|
||||
Window::FullscreenType fstype; // = FULLSCREEN_TYPE_EXCLUSIVE
|
||||
bool vsync; // = true
|
||||
int msaa; // = 0
|
||||
bool resizable; // = false
|
||||
|
||||
@@ -357,7 +357,7 @@ void Window::updateSettings(const WindowSettings &newsettings)
|
||||
else if ((wflags & SDL_WINDOW_FULLSCREEN) == SDL_WINDOW_FULLSCREEN)
|
||||
{
|
||||
curMode.settings.fullscreen = true;
|
||||
curMode.settings.fstype = FULLSCREEN_TYPE_NORMAL;
|
||||
curMode.settings.fstype = FULLSCREEN_TYPE_EXCLUSIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -387,7 +387,7 @@ void Window::updateSettings(const WindowSettings &newsettings)
|
||||
|
||||
// Only minimize on focus loss if the window is in exclusive-fullscreen
|
||||
// mode.
|
||||
if (curMode.settings.fullscreen && curMode.settings.fstype == FULLSCREEN_TYPE_NORMAL)
|
||||
if (curMode.settings.fullscreen && curMode.settings.fstype == FULLSCREEN_TYPE_EXCLUSIVE)
|
||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "1");
|
||||
else
|
||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
|
||||
|
||||
@@ -92,8 +92,8 @@ int w_setMode(lua_State *L)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Default to "normal" fullscreen.
|
||||
settings.fstype = Window::FULLSCREEN_TYPE_NORMAL;
|
||||
// Default to exclusive fullscreen mode.
|
||||
settings.fstype = Window::FULLSCREEN_TYPE_EXCLUSIVE;
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
@@ -129,7 +129,7 @@ int w_getMode(lua_State *L)
|
||||
|
||||
lua_newtable(L);
|
||||
|
||||
const char *fstypestr = "normal";
|
||||
const char *fstypestr = "exclusive";
|
||||
Window::getConstant(settings.fstype, fstypestr);
|
||||
|
||||
lua_pushstring(L, fstypestr);
|
||||
|
||||
Reference in New Issue
Block a user