mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
824801ae6b
2 changed files with 5 additions and 6 deletions
|
@ -57,7 +57,9 @@ public:
|
||||||
// Returns a random number in the range [0,mod)
|
// Returns a random number in the range [0,mod)
|
||||||
int operator() (int mod)
|
int operator() (int mod)
|
||||||
{
|
{
|
||||||
return GenRand32() % mod;
|
return (0 == mod)
|
||||||
|
? 0
|
||||||
|
: (GenRand32() % mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns rand# - rand#
|
// Returns rand# - rand#
|
||||||
|
|
|
@ -625,7 +625,7 @@ void CocoaVideo::SetFullscreenMode(const int width, const int height)
|
||||||
[m_window setHidesOnDeactivate:YES];
|
[m_window setHidesOnDeactivate:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
[m_window setFrame:displayRect display:YES];
|
[m_window setFrame:screenFrame display:YES];
|
||||||
[m_window setFrameOrigin:NSMakePoint(0.0f, 0.0f)];
|
[m_window setFrameOrigin:NSMakePoint(0.0f, 0.0f)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1231,10 +1231,7 @@ NSSize I_GetContentViewSize(const NSWindow* const window)
|
||||||
const NSView* const view = [window contentView];
|
const NSView* const view = [window contentView];
|
||||||
const NSSize frameSize = [view frame].size;
|
const NSSize frameSize = [view frame].size;
|
||||||
|
|
||||||
// TODO: figure out why [NSView frame] returns different values in "fullscreen" and in window
|
return (vid_hidpi)
|
||||||
// In "fullscreen" the result is multiplied by [NSScreen backingScaleFactor], but not in window
|
|
||||||
|
|
||||||
return (vid_hidpi && !fullscreen)
|
|
||||||
? [view convertSizeToBacking:frameSize]
|
? [view convertSizeToBacking:frameSize]
|
||||||
: frameSize;
|
: frameSize;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue