ALL: synced with ScummVM commit 09bf38c120
This commit is contained in:
parent
b5d73d4c22
commit
b586571900
414 changed files with 111155 additions and 38279 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "backends/graphics/graphics.h"
|
||||
#include "backends/platform/sdl/sdl-window.h"
|
||||
|
||||
#include "common/events.h"
|
||||
#include "common/rect.h"
|
||||
|
||||
class SdlEventSource;
|
||||
|
@ -35,7 +36,7 @@ class SdlEventSource;
|
|||
*
|
||||
* It features a few extra a few extra features required by SdlEventSource.
|
||||
*/
|
||||
class SdlGraphicsManager : virtual public GraphicsManager {
|
||||
class SdlGraphicsManager : virtual public GraphicsManager, public Common::EventObserver {
|
||||
public:
|
||||
SdlGraphicsManager(SdlEventSource *source, SdlWindow *window);
|
||||
virtual ~SdlGraphicsManager();
|
||||
|
@ -74,7 +75,7 @@ public:
|
|||
* @param width Requested window width.
|
||||
* @param height Requested window height.
|
||||
*/
|
||||
virtual void notifyResize(const uint width, const uint height) {}
|
||||
virtual void notifyResize(const int width, const int height) {}
|
||||
|
||||
/**
|
||||
* Transforms real screen coordinates into the current active screen
|
||||
|
@ -99,6 +100,9 @@ public:
|
|||
*/
|
||||
virtual bool notifyMousePosition(Common::Point &mouse) = 0;
|
||||
|
||||
virtual bool saveScreenshot(const Common::String &filename) const { return false; }
|
||||
void saveScreenshot();
|
||||
|
||||
/**
|
||||
* A (subset) of the graphic manager's state. This is used when switching
|
||||
* between different SDL graphic managers at runtime.
|
||||
|
@ -129,6 +133,21 @@ public:
|
|||
*/
|
||||
SdlWindow *getWindow() const { return _window; }
|
||||
|
||||
Common::Keymap *getKeymap();
|
||||
|
||||
protected:
|
||||
enum CustomEventAction {
|
||||
kActionToggleFullscreen = 100,
|
||||
kActionToggleMouseCapture,
|
||||
kActionSaveScreenshot,
|
||||
kActionToggleAspectRatioCorrection
|
||||
};
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
public:
|
||||
void unlockWindowSize() {}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
SdlEventSource *_eventSource;
|
||||
SdlWindow *_window;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue