diff --git a/src/controller/controldeck/ControlDeck.cpp b/src/controller/controldeck/ControlDeck.cpp index 3284892ca..31734dfc5 100644 --- a/src/controller/controldeck/ControlDeck.cpp +++ b/src/controller/controldeck/ControlDeck.cpp @@ -95,28 +95,6 @@ bool ControlDeck::MouseGameInputBlocked() { return AllGameInputBlocked() || (window->ID != Context::GetInstance()->GetWindow()->GetGui()->GetMainGameWindowID()); } -void ControlDeck::WriteToPad(OSContPad* pad) { - SDL_PumpEvents(); - - if (AllGameInputBlocked()) { - return; - } - - mPads = pad; - - for (size_t i = 0; i < mPorts.size(); i++) { - const std::shared_ptr controller = mPorts[i]->GetConnectedController(); - - if (controller != nullptr) { - controller->ReadToPad(&pad[i]); - } - } -} - -OSContPad* ControlDeck::GetPads() { - return mPads; -} - std::shared_ptr ControlDeck::GetControllerByPort(uint8_t port) { return mPorts[port]->GetConnectedController(); } diff --git a/src/graphic/Fast3D/Fast3dWindow.cpp b/src/graphic/Fast3D/Fast3dWindow.cpp index 1eb006ec6..cecb4bf02 100644 --- a/src/graphic/Fast3D/Fast3dWindow.cpp +++ b/src/graphic/Fast3D/Fast3dWindow.cpp @@ -283,9 +283,11 @@ bool Fast3dWindow::KeyDown(int32_t scancode) { return isProcessed; } -<<<<<<< HEAD void Fast3dWindow::AllKeysUp() { -======= + Ship::Context::GetInstance()->GetControlDeck()->ProcessKeyboardEvent(Ship::KbEventType::LUS_KB_EVENT_ALL_KEYS_UP, + Ship::KbScancode::LUS_KB_UNKNOWN); +} + bool Fast3dWindow::MouseButtonUp(int button) { return Ship::Context::GetInstance()->GetControlDeck()->ProcessMouseEvent( false, @@ -301,12 +303,6 @@ bool Fast3dWindow::MouseButtonDown(int button) { return isProcessed; } -void Fast3dWindow::AllKeysUp(void) { ->>>>>>> f0ddf336 (mouse buttons callbacks) - Ship::Context::GetInstance()->GetControlDeck()->ProcessKeyboardEvent(Ship::KbEventType::LUS_KB_EVENT_ALL_KEYS_UP, - Ship::KbScancode::LUS_KB_UNKNOWN); -} - void Fast3dWindow::OnFullscreenChanged(bool isNowFullscreen) { std::shared_ptr wnd = Ship::Context::GetInstance()->GetWindow(); diff --git a/src/graphic/Fast3D/Fast3dWindow.h b/src/graphic/Fast3D/Fast3dWindow.h index dab81a370..6bd8b6404 100644 --- a/src/graphic/Fast3D/Fast3dWindow.h +++ b/src/graphic/Fast3D/Fast3dWindow.h @@ -50,13 +50,9 @@ class Fast3dWindow : public Ship::Window { protected: static bool KeyDown(int32_t scancode); static bool KeyUp(int32_t scancode); -<<<<<<< HEAD static void AllKeysUp(); -======= - static void AllKeysUp(void); static bool MouseButtonDown(int button); static bool MouseButtonUp(int button); ->>>>>>> f0ddf336 (mouse buttons callbacks) static void OnFullscreenChanged(bool isNowFullscreen); private: diff --git a/src/graphic/Fast3D/gfx_sdl2.cpp b/src/graphic/Fast3D/gfx_sdl2.cpp index 38fde4e07..c1e0a3a5b 100644 --- a/src/graphic/Fast3D/gfx_sdl2.cpp +++ b/src/graphic/Fast3D/gfx_sdl2.cpp @@ -54,13 +54,9 @@ static bool is_running = true; static void (*on_fullscreen_changed_callback)(bool is_now_fullscreen); static bool (*on_key_down_callback)(int scancode); static bool (*on_key_up_callback)(int scancode); -<<<<<<< HEAD static void (*on_all_keys_up_callback)(); -======= -static void (*on_all_keys_up_callback)(void); static bool (*on_mouse_button_down_callback)(int btn); static bool (*on_mouse_button_up_callback)(int btn); ->>>>>>> f0ddf336 (mouse buttons callbacks) #ifdef _WIN32 LONG_PTR SDL_WndProc; diff --git a/src/graphic/Fast3D/gfx_window_manager_api.h b/src/graphic/Fast3D/gfx_window_manager_api.h index 63ec17a2c..9fd3555db 100644 --- a/src/graphic/Fast3D/gfx_window_manager_api.h +++ b/src/graphic/Fast3D/gfx_window_manager_api.h @@ -9,12 +9,8 @@ struct GfxWindowManagerAPI { uint32_t height, int32_t posX, int32_t posY); void (*close)(); void (*set_keyboard_callbacks)(bool (*on_key_down)(int scancode), bool (*on_key_up)(int scancode), -<<<<<<< HEAD void (*on_all_keys_up)()); -======= - void (*on_all_keys_up)(void)); void (*set_mouse_callbacks)(bool (*on_mouse_button_down)(int btn), bool (*on_mouse_button_up)(int btn)); ->>>>>>> f0ddf336 (mouse buttons callbacks) void (*set_fullscreen_changed_callback)(void (*on_fullscreen_changed)(bool is_now_fullscreen)); void (*set_fullscreen)(bool enable); void (*get_active_window_refresh_rate)(uint32_t* refresh_rate);