Complement SetWindowMonitor SDL implementation 2
This commit is contained in:
parent
3d259835b1
commit
13a66d8c72
|
|
@ -583,7 +583,7 @@ void SetWindowPosition(int x, int y)
|
||||||
// Set monitor for the current window
|
// Set monitor for the current window
|
||||||
void SetWindowMonitor(int monitor)
|
void SetWindowMonitor(int monitor)
|
||||||
{
|
{
|
||||||
int monitorCount = SDL_GetNumVideoDisplays();
|
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||||
if ((monitor >= 0) && (monitor < monitorCount))
|
if ((monitor >= 0) && (monitor < monitorCount))
|
||||||
{
|
{
|
||||||
if (CORE.Window.fullscreen) ToggleFullscreen();
|
if (CORE.Window.fullscreen) ToggleFullscreen();
|
||||||
|
|
@ -607,6 +607,8 @@ void SetWindowMonitor(int monitor)
|
||||||
// 3. It was't done here because we can't assume changing the window size automatically
|
// 3. It was't done here because we can't assume changing the window size automatically
|
||||||
// is acceptable behavior by the user.
|
// is acceptable behavior by the user.
|
||||||
SDL_SetWindowPosition(platform.window, usableBounds.x, usableBounds.y);
|
SDL_SetWindowPosition(platform.window, usableBounds.x, usableBounds.y);
|
||||||
|
CORE.Window.position.x = x;
|
||||||
|
CORE.Window.position.y = y;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user