X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FOpenGL_Windows.cpp;h=2aec38d94c0fe2ef4d82225e57c592d7b810325d;hb=67aaac9d28215f63f6739dc47976e214514e840a;hp=1588b6456c4014505707bc2fe9fe047782132239;hpb=65fe5d46ff8f86bcf08cf61012f04e3a3d4bc30e;p=lugaru.git diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 1588b64..2aec38d 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -468,17 +468,10 @@ static void sdlEventProc(const SDL_Event &e, Game &game) case SDL_MOUSEBUTTONDOWN: { val = clamp_sdl_mouse_button(e.button.button); - if (val >= 0) + if ((val >= 0) && (val <= 2)) { if (val == 0) - { g_button = true; - SetKey(MAC_MOUSEBUTTON1); - } - - else if (val == 1) - SetKey(MAC_MOUSEBUTTON2); - buttons[val] = true; } } @@ -487,17 +480,10 @@ static void sdlEventProc(const SDL_Event &e, Game &game) case SDL_MOUSEBUTTONUP: { val = clamp_sdl_mouse_button(e.button.button); - if (val >= 0) + if ((val >= 0) && (val <= 2)) { if (val == 0) - { g_button = false; - ClearKey(MAC_MOUSEBUTTON1); - } - - else if (val == 1) - ClearKey(MAC_MOUSEBUTTON2); - buttons[val] = false; } } @@ -884,7 +870,7 @@ Boolean SetUp (Game & game) if (!cmdline("windowed")) sdlflags |= SDL_FULLSCREEN; - SDL_WM_SetCaption("Lugaru", "lugaru"); + SDL_WM_SetCaption("Lugaru", "Lugaru"); SDL_ShowCursor(0);