Skip to content
Browse files

final fix for the framerate issue (#10?)

  • Loading branch information...
1 parent 672b61b commit 7e16b076323a2c45c1d98f7672b5b8eab04664cd @kritzikratzi committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/fullscreen/SoftFullScreen.java
View
6 src/fullscreen/SoftFullScreen.java
@@ -23,6 +23,7 @@
import japplemenubar.JAppleMenuBar;
import java.awt.Color;
+import java.awt.Dimension;
import java.awt.Frame;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
@@ -201,7 +202,10 @@ else if( fullScreen ){
fsFrame.setVisible( true );
fsFrame.setLocation( fsDevice.getDefaultConfiguration().getBounds().getLocation() );
- dad.setLocation( ( fsFrame.getWidth() - dad.width ) / 2, ( fsFrame.getHeight() - dad.height ) / 2 - 1 );
+
+ boolean usesEntireScreen = fsDevice.getDefaultConfiguration().getBounds().getSize().equals( new Dimension( dad.width, dad.height ) );
+ int appleDriversSuck = PApplet.platform == PConstants.MACOSX && usesEntireScreen? 1:0;
+ dad.setLocation( ( fsFrame.getWidth() - dad.width ) / 2, ( fsFrame.getHeight() - dad.height ) / 2 - appleDriversSuck );
fsFrame.setExtendedState( Frame.MAXIMIZED_BOTH );
GLDrawableHelper.reAllocate( this );

0 comments on commit 7e16b07

Please sign in to comment.
Something went wrong with that request. Please try again.