Fixed a bug where a Cocoa emulator window will appear frozen (or partially frozen) until resized
This commit is contained in:
parent
180f0e16b0
commit
32a1ad87b7
@ -4,8 +4,6 @@
|
||||
#import "GBButtons.h"
|
||||
#import "NSString+StringForKey.h"
|
||||
|
||||
static GBShader *shader = nil;
|
||||
|
||||
@implementation GBView
|
||||
{
|
||||
uint32_t *image_buffers[3];
|
||||
@ -93,7 +91,10 @@ static GBShader *shader = nil;
|
||||
if (!self.shader) {
|
||||
self.shader = [[GBShader alloc] initWithName:[[NSUserDefaults standardUserDefaults] objectForKey:@"GBFilter"]];
|
||||
}
|
||||
|
||||
double scale = self.window.backingScaleFactor;
|
||||
glViewport(0, 0, self.bounds.size.width * scale, self.bounds.size.height * scale);
|
||||
|
||||
if (_shouldBlendFrameWithPrevious) {
|
||||
[self.shader renderBitmap:image_buffers[current_buffer]
|
||||
previous:image_buffers[(current_buffer + 2) % self.numberOfBuffers]
|
||||
@ -171,12 +172,6 @@ static GBShader *shader = nil;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)reshape
|
||||
{
|
||||
double scale = self.window.backingScaleFactor;
|
||||
glViewport(0, 0, self.bounds.size.width * scale, self.bounds.size.height * scale);
|
||||
}
|
||||
|
||||
- (BOOL)becomeFirstResponder
|
||||
{
|
||||
/* Non-Roman keyboard layouts breaks user input. */
|
||||
|
Loading…
Reference in New Issue
Block a user