diff options
author | Littleboy | 2011-04-04 12:35:19 -0400 |
---|---|---|
committer | Julien | 2011-06-16 14:22:51 -0400 |
commit | 6c14d8a95052b68c9f076d32e520c6befac3d959 (patch) | |
tree | 065d18cf4d35158c62ba6a39ec0029dc564d46c4 /backends/platform/sdl | |
parent | cd09b7e74fd9552901505082166b679c39f85ccc (diff) | |
download | scummvm-rg350-6c14d8a95052b68c9f076d32e520c6befac3d959.tar.gz scummvm-rg350-6c14d8a95052b68c9f076d32e520c6befac3d959.tar.bz2 scummvm-rg350-6c14d8a95052b68c9f076d32e520c6befac3d959.zip |
BACKENDS: Integrate glib main event loop
- Unity needs a glib event loop to dispatch events.
- Cleanup whitespace and indentation
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/posix/posix.cpp | 9 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp index f124a3af7d..94f8d95ffb 100644 --- a/backends/platform/sdl/posix/posix.cpp +++ b/backends/platform/sdl/posix/posix.cpp @@ -51,8 +51,8 @@ void OSystem_POSIX::init() { _fsFactory = new POSIXFilesystemFactory(); #if defined(USE_TASKBAR) - // Initialize taskbar manager - _taskbarManager = new UnityTaskbarManager(); + // Initialize taskbar manager + _taskbarManager = new UnityTaskbarManager(); #endif // Invoke parent implementation of this method @@ -66,6 +66,11 @@ void OSystem_POSIX::initBackend() { // Invoke parent implementation of this method OSystem_SDL::initBackend(); + +#if defined(USE_TASKBAR) + // Register the taskbar manager as an event source (this is necessary for the glib event loop to be run) + _eventManager->getEventDispatcher()->registerSource((UnityTaskbarManager *)_taskbarManager, false); +#endif } bool OSystem_POSIX::hasFeature(Feature f) { diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 4520b74861..4743dbb558 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -385,7 +385,7 @@ void OSystem_SDL::setupIcon() { if (sscanf(scummvm_icon[0], "%d %d %d %d", &w, &h, &ncols, &nbytes) != 4) { warning("Wrong format of scummvm_icon[0] (%s)", scummvm_icon[0]); - + return; } if ((w > 512) || (h > 512) || (ncols > 255) || (nbytes > 1)) { |