X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_main.c;h=6375448cc1d5c31aee70f063f7633135ce3ad8a0;hb=02d1360233aa5a71d0f46fda6c6956c5122fad80;hp=16a667465649545f56fd904ed3772f0c0e5fc1db;hpb=1d883926ef0bf15e6af94957f01ea8e7ef6088a5;p=freeglut diff --git a/src/freeglut_main.c b/src/freeglut_main.c index 16a6674..6375448 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -1377,11 +1377,14 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, break; } - if( GetSystemMetrics( SM_SWAPBUTTON ) ) - if( button == GLUT_LEFT_BUTTON ) + if ( GetSystemMetrics( SM_SWAPBUTTON ) ) + { + if ( button == GLUT_LEFT_BUTTON ) button = GLUT_RIGHT_BUTTON; - else if( button == GLUT_RIGHT_BUTTON ) + else + if ( button == GLUT_RIGHT_BUTTON ) button = GLUT_LEFT_BUTTON; + } if( button == -1 ) return DefWindowProc( hWnd, uMsg, lParam, wParam );