|
@@ -30,31 +30,23 @@ public:
|
|
|
bool ChangeResolution(int w, int h) override;
|
|
|
|
|
|
bool ToggleFullscreen(bool fullscreen) override;
|
|
|
|
|
|
bool AfterBlitterChange() override;
|
|
|
|
|
|
void AcquireBlitterLock() override;
|
|
|
|
|
|
void ReleaseBlitterLock() override;
|
|
|
|
|
|
bool ClaimMousePointer() override;
|
|
|
|
|
|
void EditBoxGainedFocus() override;
|
|
|
|
|
|
void EditBoxLostFocus() override;
|
|
|
|
|
|
const char *GetName() const override { return "sdl"; }
|
|
|
|
|
|
protected:
|
|
|
struct SDL_Window *sdl_window; ///< Main SDL window.
|
|
|
Palette local_palette; ///< Copy of _cur_palette.
|
|
|
bool draw_threaded; ///< Whether the drawing is/may be done in a separate thread.
|
|
|
std::recursive_mutex *draw_mutex = nullptr; ///< Mutex to keep the access to the shared memory controlled.
|
|
|
std::condition_variable_any *draw_signal = nullptr; ///< Signal to draw the next frame.
|
|
|
volatile bool draw_continue; ///< Should we keep continue drawing?
|
|
|
bool buffer_locked; ///< Video buffer was locked by the main thread.
|
|
|
Rect dirty_rect; ///< Rectangle encompassing the dirty area of the video buffer.
|
|
|
|
|
|
Dimension GetScreenSize() const override;
|
|
|
void InputLoop() override;
|
|
|
bool LockVideoBuffer() override;
|
|
@@ -88,13 +80,9 @@ private:
|
|
|
/**
|
|
|
* This is true to indicate that keyboard input is in text input mode, and SDL_TEXTINPUT events are enabled.
|
|
|
*/
|
|
|
bool edit_box_focused;
|
|
|
|
|
|
int startup_display;
|
|
|
std::thread draw_thread;
|
|
|
std::unique_lock<std::recursive_mutex> draw_lock;
|
|
|
|
|
|
static void PaintThreadThunk(VideoDriver_SDL_Base *drv);
|
|
|
};
|
|
|
|
|
|
#endif /* VIDEO_SDL_H */
|