Skip to content

Commit

Permalink
sokol_app.h gl: remove the NSOpenGLView.reshape handler
Browse files Browse the repository at this point in the history
This was a hack/workaround for a size reporting problem in
NSOpenGLView when the requested window size was bigger than the
display size. It looks like this workaround is no longer needed
(and it also makes the last commit irrelevant)
  • Loading branch information
floooh committed May 8, 2023
1 parent 957191c commit 2ef0ebd
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions sokol_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -3973,20 +3973,6 @@ _SOKOL_PRIVATE void _sapp_macos_frame(void) {

@implementation _sapp_macos_view
#if defined(SOKOL_GLCORE33)
/* NOTE: this is a hack/fix when the initial window size has been clipped by
macOS because it didn't fit on the screen, in that case the
frame size of the window is reported wrong if low-dpi rendering
was requested (instead the high-dpi dimensions are returned)
until the window is resized for the first time.
Hooking into reshape and getting the frame dimensions seems to report
the correct dimensions.
*/
- (void)reshape {
[[self openGLContext] makeCurrentContext];
_sapp_macos_update_dimensions();
[super reshape];
}
- (void)timerFired:(id)sender {
_SOKOL_UNUSED(sender);
[self setNeedsDisplay:YES];
Expand Down

0 comments on commit 2ef0ebd

Please sign in to comment.