Skip to content

Commit

Permalink
Fix contentScale
Browse files Browse the repository at this point in the history
  • Loading branch information
phoboslab committed Dec 12, 2015
1 parent d8b8656 commit 84d342c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Source/Ejecta/EJCanvas/2D/EJCanvasContext2DScreen.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ - (void)resizeToWidth:(short)newWidth height:(short)newHeight {
height = newHeight;

CGRect frame = self.frame;
float contentScale = MAX(bufferWidth/frame.size.width, bufferHeight/frame.size.height);
float contentScale = MAX(width/frame.size.width, height/frame.size.height);

NSLog(
@"Creating ScreenCanvas (2D): "
Expand Down
6 changes: 3 additions & 3 deletions Source/Ejecta/EJCanvas/WebGL/EJCanvasContextWebGLScreen.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ - (CGRect)frame {
- (void)resizeToWidth:(short)newWidth height:(short)newHeight {
[self flushBuffers];

bufferWidth = width = newWidth;
bufferHeight = height = newHeight;
width = newWidth;
height = newHeight;

CGRect frame = self.frame;
float contentScale = MAX(bufferWidth/frame.size.width, bufferHeight/frame.size.height);
float contentScale = MAX(width/frame.size.width, height/frame.size.height);

NSLog(
@"Creating ScreenCanvas (WebGL): "
Expand Down

0 comments on commit 84d342c

Please sign in to comment.