Skip to content

Commit

Permalink
Changed the Linux framerate to fix the "event collision" issue
Browse files Browse the repository at this point in the history
  • Loading branch information
KAHR-Alpha committed Aug 4, 2023
1 parent a7dc3ef commit c5c8335
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Todo:

0.10.2
- Fixed how Materials are displayed in Selene
- Reduced the OpenGL Framerate on Linux temporarily

0.10.1
- Fixed the messed-up Mie Tool GUI due to the material rework of 0.10
Expand Down
17 changes: 17 additions & 0 deletions src/GUI/gui_gl_fd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ limitations under the License.*/

#include <gui_gl_fd.h>


#if defined(unix) || defined(__unix__) || defined(__unix)
#define UNIX_PLATFORM
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#endif


extern const double Pi;

//###################
Expand All @@ -32,7 +41,11 @@ GL_2D_display::GL_2D_display(wxWindow *parent)
timer=new wxTimer(this);
Bind(wxEVT_TIMER,&GL_2D_display::evt_timed_refresh,this);
Bind(wxEVT_SIZE,&GL_2D_display::evt_resize,this);
#ifdef UNIX_PLATFORM
timer->Start(1000/15);
#else
timer->Start(1000/60);
#endif
}

GL_2D_display::~GL_2D_display()
Expand Down Expand Up @@ -349,7 +362,11 @@ GL_3D_Base::GL_3D_Base(wxWindow *parent)
// Bind(wxEVT_MOTION,&GL_3D_Base::evt_mouse_motion,this);
// Bind(wxEVT_MOUSEWHEEL,&GL_3D_Base::evt_mouse_wheel,this);
Bind(wxEVT_TIMER,&GL_3D_Base::timed_refresh,this);
#ifdef UNIX_PLATFORM
timer->Start(1000/15);
#else
timer->Start(1000/60);
#endif

// Bind(wxEVT_CREATE,&GL_3D_Base::evt_shown,this);

Expand Down

0 comments on commit c5c8335

Please sign in to comment.