@@ -193,17 +193,14 @@ void CInput::ClipCursor(bool clip)
193193{
194194 if (clip)
195195 {
196+ // ::ClipCursor(&Device.m_rcWindowClient);
196197 SDL_RenderSetClipRect (Device.m_sdlRndr , &Device.m_rcWindowClient );
197- while (ShowCursor (FALSE ) >= 0 )
198- {
199- }
198+ SDL_ShowCursor (SDL_DISABLE);
200199 }
201200 else
202201 {
203- ::ClipCursor (nullptr );
204- while (ShowCursor (TRUE ) <= 0 )
205- {
206- }
202+ // ::ClipCursor(nullptr);
203+ SDL_ShowCursor (SDL_ENABLE);
207204 }
208205}
209206
@@ -317,22 +314,22 @@ void CInput::OnFrame(void)
317314 // MouseUpdate(&event);
318315 // MouseUpdate();
319316 continue ;
320- case SDL_WINDOWEVENT:
321- switch (event.window .event )
322- {
323- case SDL_WINDOWEVENT_CLOSE:
324- event.type = SDL_QUIT;
325- SDL_PushEvent (&event);
326- continue ;
327- case SDL_WINDOWEVENT_ENTER:
328- #if SDL_VERSION_ATLEAST(2, 0, 5)
329- case SDL_WINDOWEVENT_TAKE_FOCUS:
330- RDEVICE.OnWM_Activate (event.window .data1 , event.window .data2 );
331- continue ;
332- #endif
333- default : SDL_Log (" Window %d got unknown event %d" , event.window .windowID , event.window .event ); continue ;
334- }
335- continue ;
317+ // case SDL_WINDOWEVENT:
318+ // switch (event.window.event)
319+ // {
320+ // case SDL_WINDOWEVENT_CLOSE:
321+ // event.type = SDL_QUIT;
322+ // SDL_PushEvent(&event);
323+ // continue;
324+ // case SDL_WINDOWEVENT_ENTER:
325+ // #if SDL_VERSION_ATLEAST(2, 0, 5)
326+ // case SDL_WINDOWEVENT_TAKE_FOCUS:
327+ // RDEVICE.OnWM_Activate(event.window.data1, event.window.data2);
328+ // continue;
329+ // #endif
330+ // default: SDL_Log("Window %d got unknown event %d", event.window.windowID, event.window.event); continue;
331+ // }
332+ // continue;
336333 case SDL_QUIT:
337334 Engine.Event .Defer (" KERNEL:disconnect" );
338335 Engine.Event .Defer (" KERNEL:quit" );
0 commit comments