7 #include "../../window.h"
8 #include "../../platform.h"
10 #include "../../threads/mutex.h"
14 struct KOSWindowPrivate;
19 return Window::create<KOSWindow>(app);
25 void set_title(
const std::string&)
override {}
26 void cursor_position(int32_t&, int32_t&)
override {}
27 void show_cursor(
bool)
override {}
28 void lock_cursor(
bool)
override {}
30 void destroy_window()
override;
31 void check_events()
override;
33 void initialize_input_controller(
InputState &controller)
override;
35 std::shared_ptr<SoundDriver> create_sound_driver(
const std::string& from_config)
override;
38 void do_swap_buffers()
override;
39 bool _init_window()
override;
40 bool _init_renderer(
Renderer* renderer)
override;
44 void render_screen(
Screen* screen,
const uint8_t* data,
int row_stride)
override;
46 float time_since_last_controller_update_ = 0.0f;
48 struct ControllerState {
56 Seconds current_rumble_remaining_;
59 ControllerState previous_controller_state_[4] = {{}, {}, {}, {}};
60 uint32_t previous_controller_button_state_[4] = {0};
61 uint8_t previous_key_state_[MAX_KEYBOARD_CODES] = {0};
64 virtual void game_controller_stop_rumble(
GameController *controller)
override;
67 std::shared_ptr<KOSWindowPrivate> private_;