Commit Graph

690 Commits

Author SHA1 Message Date
rsn8887
dafadbc8c7 PSP2: Add controller config, remove joystick event handling 2017-12-26 21:11:05 +01:00
Bastien Bouclet
a86eae6323 SDL: Only enable joystick related features when joysticks are enabled
Fixes #9714.
2017-12-26 21:11:05 +01:00
Bastien Bouclet
ee4ff8ca08 SDL: Cleanup joystick deadzone handling 2017-12-26 21:11:04 +01:00
Bastien Bouclet
1fb748e974 SDL: Move the non analog joystick code to the Symbian port
Symbian was the only user of that code.
2017-12-26 21:11:04 +01:00
Thierry Crozat
4f1025378f BUILD: Check if posix_spawn is available in configure 2017-12-15 01:08:14 +00:00
Thierry Crozat
2926cd4a50 POSIX: Fix compilation with some old macOS SDKs 2017-12-14 23:37:20 +00:00
Colin Snover
008149e357 POSIX: Do not hang ScummVM when opening a browser
If the call used to open the browser does not return until the
browser is closed, this would previously cause ScummVM to hang.
Since we are using waitpid now, we can avoid hanging by telling
waitpid to not block on a child which has not exited.
2017-12-14 14:30:16 -06:00
Colin Snover
7aaac1dfba POSIX: Fix CVE-2017-17528 2017-12-14 14:30:11 -06:00
rsn8887
c78fa86860 PSP2: fix clipping and display quality for odd resolutions (Phantasmagoria) 2017-12-02 13:00:22 -06:00
Thierry Crozat
2d88a30803 Revert "SDL: Use RLE acceleration for SDL2 transparent surfaces"
This reverts commit 6b4195a542.
There seemed to be no clear benefit in using RLE for transparent
surfaces, and there were a few reports that it might cause crashes
on Windows. So to be on the safe side I prefer to revert this
commit.
2017-11-26 01:56:48 +00:00
Bastien Bouclet
8fc70ce37f SDL: Improve handling of SDL2 keyboard repeat events
- Flag them as repeat events
- Disable ScummVM's own repeat event generation

This fixes keyboard repeat events not being flagged as such with SDL2,
and complies with the user's operating system preferences regarding key
repeat timings.
2017-11-19 16:12:50 +01:00
Colin Snover
d3a831644c SDL: Grab mouse when ScummVM is started in fullscreen mode 2017-11-17 12:01:35 -06:00
Thierry Crozat
6b4195a542 SDL: Use RLE acceleration for SDL2 transparent surfaces
We were already doing it for SDL1.2, but with SDL2 the SDL_RLEACCEL
is not passed to SDL and instead we need to call SDL_SetSurfaceRLE.
2017-11-11 00:18:57 +00:00
Colin Snover
3a95213905 SDL: Automatically grab mouse upon entering fullscreen
Folks are confused about the new behaviour where the mouse is not
restricted to the game area in fullscreen, which is understandable.

This changes mouseIsGrabbed to use SDL directly in order to avoid
making changes to the user preference in the _inputGrabState.
Otherwise we'd either clobber the user's previous windowed mouse
grab preference, or require maintaining a second variable just to
track the original state, when we can have SDL do that for us.
2017-10-23 22:36:04 -05:00
Colin Snover
d1b77d4b68 BACKENDS: Fix missing mouse events when system cursor cannot be moved
Normally with SDL, a mouse motion event will be sent after the
system mouse cursor has been moved by a call to
SDL_WarpMouseInWindow, but if the system cursor cannot be moved
(e.g. because the window does not have mouse focus), games still
need to receive these mouse events so they can successfully update
the mouse position internally. Otherwise, games continue to think
the mouse is still in the original position and will continue to
try to perform whatever action is associated with that mouse
position.

Refs Trac#9689.
2017-10-15 13:24:21 -05:00
Colin Snover
de2bbe3b97 BACKENDS: Refactor OpenGL & SDL graphics backends
This patch refactors the OpenGL and SDL graphics backends,
primarily to unify window scaling and mouse handling, and to
fix coordinate mapping between the ScummVM window and the
virtual game screen when they have different aspect ratios.

Unified code for these two backends has been moved to a new
header-only WindowedGraphicsManager class, so named because it
contains code for managing graphics managers that interact with
a windowing system and render virtual screens within a larger
physical content window.

The biggest behavioral change here is with the coordinate
system mapping:

Previously, mouse offsets were converted by mapping the whole
space within the window as input to the virtual game screen
without maintaining aspect ratio. This was done to prevent
'stickiness' when the mouse cursor was within the window but
outside of the virtual game screen, but it caused noticeable
distortion of mouse movement speed on the axis with blank
space.

Instead of introducing mouse speed distortion to prevent
stickiness, this patch changes coordinate transformation to
show the system cursor when the mouse moves outside of the virtual
game screen when mouse grab is off, or by holding the mouse inside
the virtual game screen (instead of the entire window) when mouse
grab is on.

This patch also improves some other properties of the
GraphicsManager/PaletteManager interfaces:

* Nullipotent operations (getWidth, getHeight, etc.) of the
  PaletteManager/GraphicsManager interfaces are now const
* Methods marked `virtual` but not inherited by any subclass have
  been de-virtualized
* Extra unnecessary calculations of hardware height in
  SurfaceSdlGraphicsManager have been removed
* Methods have been renamed where appropriate for clarity
  (setWindowSize -> handleResize, etc.)
* C++11 support improved with `override` specifier added on
  overridden virtual methods in subclasses (primarily to avoid
  myself accidentally creating new methods in the subclasses
  by changing types/names during refactoring)

Additional refactoring can and should be done at some point to
continue to deduplicate code between the OpenGL and SDL backends.
Since the primary goal here was to improve the coordinate mapping,
full refactoring of these backends was not completed here.
2017-10-15 13:24:20 -05:00
Colin Snover
0ad03e492a SDL: Accept signed values for mouse cursor warping
This matches the other ScummVM and SDL APIs for mouse warp.
2017-10-15 13:24:20 -05:00
Colin Snover
6e157429b7 BACKENDS: Fix window sizing of games that switch between multiple resolutions 2017-10-07 12:30:29 -05:00
Colin Snover
ebe6c40a6a SDL: Do not reset window size when engines update rendering surface
This change allows:

* Engines to update their target rendering surface/size and pixel
  format with the backend multiple times during gameplay;
* Users to resize the ScummVM window without having it reset
  size/position every time an engine updates its target surface
  format;
* Conversions/scaling to continue to run efficiently in hardware,
  instead of requiring engines to pick their maximum possible
  output format once and upscale inefficiently in software;
* The window to reset size once when an engine calls to set its
  initial output size, and to reset again once ScummVM returns to
  the launcher.

This is relevant for at least SCI32 and DreamWeb engines, which
perform graphics mode switches during games.
2017-10-07 12:30:29 -05:00
Cameron Cawley
51949bbc9e RISCOS: Add RISC OS filesystem 2017-10-01 20:19:42 +02:00
Thierry Crozat
3607b79d7d MACOSX: Remove mixer init from derived class for macosx backend
Since the macosx backend now does the same as the base SDL backend
we can just let the base class do its stuff.
2017-09-12 21:30:29 +01:00
Colin Snover
bcbd443359 SDL: Stop using double buffering mixer on macOS
This mixer type was added in
943b4c2036 because "anything which
produces sampled data with high latency (like the MT-32 emulator)
will sound terribly", but as far as I can see (or reproduce), this
mixer doesn't do anything that would solve that problem, except
that it effectively doubles the size of the audio buffer so there's
less chance of an underflow due to slower-than-realtime synthesis
by the softsynth. But you don't need the overhead of a separate
thread to do that, you just need to increase the buffer size.
2017-09-12 11:35:51 -05:00
Colin Snover
b8f89a772e MACOS: Fix builds on case-sensitive filesystems 2017-09-10 23:30:25 -05:00
Colin Snover
6e2f18c498 MACOS: Fix warnings about undeclared selectors
When -Wundeclared-selector is enabled (recommended by Apple), the
calls to the setBadgeLabel selector in MacOSXTaskbarManager are
warned on because NSDockTile declarations are not included because
they do not exist in macOS 10.4 and earlier. While I don't know
that we are even supporting such old macOS versions these days, it
is simple enough to fix this problem when compiling to modern
macOS versions by conditionally including the necessary header.
2017-09-10 22:17:16 -05:00
Colin Snover
56810b5598 MACOS: Fix deprecation warnings in macOS 10.12 2017-09-10 22:17:16 -05:00
Cameron Cawley
aba431ca9b RISCOS: Use double quotes in sed command 2017-09-03 10:40:07 +02:00
Cameron Cawley
0d1df59be1 RISCOS: Automatically calculate the correct WimpSlot size 2017-09-03 10:40:07 +02:00
Cameron Cawley
b9694a01db RISCOS: Use shorter filenames for config and log files 2017-09-03 10:40:07 +02:00
Cameron Cawley
0e7d9414a6 RISCOS: Correctly set executable extension 2017-09-03 10:40:07 +02:00
Cameron Cawley
7a00045df0 RISCOS: Add networking files to application 2017-09-03 10:40:07 +02:00
cameron
a11985c46d RISCOS: Add RISC OS support 2017-09-03 10:40:07 +02:00
Frank Richter
0f93962ef4 Windows: Use GetUserDefaultUILanguage() instead of GetThreadLocale().
The thread locale concerns display options (e.g. date formatting) not
the display language. There are typically, but not necessarily the same,
as Windows allows them to be configured separately.
2017-08-01 08:55:48 +02:00
Bastien Bouclet
8c587b54ab SDL: Make the window size when exiting fullscreen workaround macOS specific
The call to SDL_SetWindowSize works around a macOS specific SDL2 bug.
Fixes the window not restoring to its previous position when exiting
fullscreen on Linux/X11.
2017-07-29 17:25:37 +02:00
Thierry Crozat
00bbb73ce5 SDL: Make sure we get the correct window size with SDL2
When updating or recreating the window, if we changed the window
size at the same time we also toggle between OpenGL and non
OpenGL mode, or toggle fullscreen mode, we may have a pending
SDL resize event with the wrong size. So we need to make sure to
append another one with the correct size to end up with the correct
size. This fixes bug #9971.
2017-07-27 21:05:44 +01:00
Colin Snover
065dd9671e SDL: Fix compilation with SDL1.2 2017-07-06 19:27:52 -05:00
Colin Snover
332fabcb8a SDL: Only recreate SDL2 window when necessary
Destroying and recreating the SDL window whenever the video mode
changes in SDL2 is not necessary and causes several problems:

1. In windowed mode, the game window shifts position;
2. In fullscreen mode in macOS, every time the window is
   recreated, it causes the OS to play its switch-to-fullscreen
   animation again and emit system alert noises;
3. The window content flickers; and
4. The engine loses events from the old destroyed window.

This patch changes the SDL backend code to avoid destroying and
recreating the SDL window when using SDL2, except when switching
OpenGL modes, since there is no way to change the OpenGL feature
of a window.

There are still some outstanding issues with OpenGL where window
size ends up getting reset even though the user has resized it;
this will probably need to be addressed at some point in another
patch.

Thanks to @bgK and @criezy for their feedback which made this
patch much better.

Co-Authored-By: Bastien Bouclet <bastien.bouclet@gmail.com>
2017-07-06 19:11:54 -05:00
Colin Snover
2d3c86187f MACOSX: Fix flipped return value of openUrl 2017-05-21 19:37:14 -05:00
Thierry Crozat
442edb6ccc MACOSX: Expand ~ in default screenshot path
When using SDL to save the screenshot, using a told results in
an error.
2017-04-26 08:39:06 +01:00
Kirben
ec0b1dec9d WINDOWS: Fix warning under mingw-w64. 2017-04-24 11:22:44 +10:00
Kirben
b46a1b688d WINDOWS: Hopefully fix mingw compilation. 2017-04-24 10:57:02 +10:00
Thierry Crozat
a1dab31c08 WIN32: Fix compilation of getScreenshotPath (missing parenthesis) 2017-04-24 01:28:50 +01:00
Thierry Crozat
23987cc724 WIN32: Comment out code that gets the user My Pictures directory
This broke compilation on buildbot as ShlObj.h cannot be found.
A developer that has access to Windows should take a look to
properly fix this.
2017-04-24 01:21:36 +01:00
Thierry Crozat
e96c057c3d SDL: Allow specifying the screenshot directory in the config file
There is no GUI option to set the screenshot directory, but this
allows power users to set it if they don't want to use the default.
2017-04-24 01:07:05 +01:00
Thierry Crozat
11dd33bb73 MACOSX: Create screenshot on Desktop
This is consistent with the OS shortcut (Crtl+Shift+3) to take a
screenshot.
2017-04-24 01:06:50 +01:00
Pala
3849a3e90e WINDOWS: Change location where screenshot are saved
This fixes bug #9701: WINDOWS: Flow of taking screenshots
on Windows is broken
2017-04-24 01:06:29 +01:00
rsn8887
96f720d93d PSP2: remove date from executable name 2017-03-06 17:10:10 -06:00
cpasjuste
70988527c6 PSP2: Add Playstation Vita (PSP2) support 2017-03-04 15:42:19 -06:00
rsn8887
45bd7a8b75 SDL: Fix erratic analog pointer + control options
Fixes erratic speeds in analog pointer motion
Implemented option to set analog/keyboard pointer speed
and control the analog joystick deadzone. The deadzone option appears
only if the build supports analog joystick (via JOY_ANALOG define)
2017-02-22 16:52:09 -06:00
Ori Avtalion
5280632b51 SDL: Fix typos 2016-10-22 21:16:21 +03:00
Eugene Sandulenko
355c4fa646 JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
Bastien Bouclet
6234b93813 SDL: Add a fixme regarding the encoding of the string returned by getTextFromClipboard 2016-09-13 09:21:51 +02:00
Bastien Bouclet
9e502bf9aa SDL: Plug a memory leak in OSystem_SDL::getTextFromClipboard 2016-09-13 09:19:53 +02:00
Thierry Crozat
1f2a50bcd3 CLOUD: Move openUrl to OSystem 2016-09-10 01:12:42 +01:00
Eugene Sandulenko
23e2a61d4e SDL: Move mouse in SDL2 only when window has focus. 2016-09-04 16:48:50 +02:00
Thierry Crozat
29535c0a55 SDL: Do not forbid time.h symbols when FORBIDDEN_SYMBOL_EXCEPTION_time_h is defined
This hopefully fixes a regression from 848c5c3.
2016-09-04 02:26:27 +01:00
Thierry Crozat
848c5c3f84 Merge pull request #810 from tsoliman/sdl2-macports
SDL: Fix build with MacPorts SDL2
2016-09-03 23:08:04 +01:00
Thierry Crozat
a2a985368c BUILD: Tie the SDL_net version to the SDL version
This means that when using SDL 1.2 we use SDL_net 1.2, but when
using SDL 2 we now use SLD_net 2 as well. Both versions work
properly and there is not code change needed in ScummVM.

This change is because SDL_net depends on SDL, and using
SDL_net 1.2 with SDL 2 means we can end up needing to link with
both the SDL and SDL2 libraries.
2016-09-03 23:07:21 +01:00
Thierry Crozat
f490fb811a OSX: Implement clipboard support
There was already an implementation using SDL2 in the SDL backend,
but this way we have it available also when using the SDL 1.
2016-08-30 21:37:34 +01:00
Alexander Tkachev
b9bba9bd4b ALL: Move Clipboard support to OSystem
Commit adds kFeatureClipboardSupport. hasTextInClipboard() and
getTextFromClipboard().

OSystem_SDL has this feature if SDL2 is used.

EditableWidget and StorageWizardDialog use g_system to access clipboard
now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
9f7bea156a CLOUD: Init SDL_Net 2016-08-24 16:07:55 +06:00
Alexander Tkachev
b3bf532211 CLOUD: Make CloudManager singleton
It's needed to ::destroy() it in main().
2016-08-24 16:07:55 +06:00
Alexander Tkachev
03217cd5c3 CLOUD: Add CurlJsonRequest
Now we can do REST API request by creating CurlJsonRequest and waiting
for it to call our callback. Passed pointer is Common::JSONValue.

This commit also does some minor variable renaming fixes.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
fade746f37 CLOUD: Add USE_CLOUD feature
Adds USE_CLOUD in both configure and create_project.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ca2eeb2214 CLOUD: Add Cloud::Manager and Cloud::Storage
This commit introduces Common::CloudManager, which can be accessed from
OSystem.

The backend for this manager is Cloud::Manager (defined in
backends/cloud/manager.h). It should load all users storages from
configs and provide access to current Storage instance. For now it just
creates a new one.

Cloud::Storage (backends/cloud/storage.h) provides an API to interact
with cloud storage, for example, create new directory or sync files.
Right now it's not ready and has only two dummy methods: listDirectory()
and syncSaves().

There is Cloud::Dropbox::DropboxStorage backend
(backends/cloud/dropbox/dropboxstorage.h) for Cloud::Storage. Right now
it implements both listDirectory() and syncSaves() with starting timer
task and handling it by printing out some JSON examples.
2016-08-24 16:05:07 +06:00
Alexander Tkachev
7446ffd73b CLOUD: Integrate CloudThread into OSystem
Would be changed soon.
2016-08-24 16:05:07 +06:00
Tarek Soliman
ad8cd2e52d SDL: Fix build with MacPorts SDL2 2016-08-20 22:33:51 -05:00
Alyssa Milburn
13d0ec9bea POSIX: Add #ifdef guards for DATA_PATH.
Thanks to snover for pointing out they should be there.
2016-08-04 16:19:13 +02:00
Eugene Sandulenko
45e82b55fc Merge pull request #795 from fuzzie/snap
POSIX: Add $SNAP to search path if available.
2016-08-02 00:06:41 +03:00
Alyssa Milburn
87818fe63a POSIX: Add $SNAP to search path if available.
This allows ScummVM to find data files while running in a snap (e.g.
from the new Ubuntu store).
2016-07-29 11:45:14 +02:00
Bastien Bouclet
ad3ab61241 COMMON: Remove the EventRecorder dependency from OSystem
EventRecorder is in the gui lib which is not linked in the cxxtest suite.
2016-07-28 18:23:46 +02:00
Filippos Karapetis
8b3a08047c UPDATES: Add support for WinSparkle 2016-05-22 18:52:33 +03:00
lubomyr
961976f17e ANDROIDSDL: add androidsdl backend 2016-05-19 20:33:27 +02:00
Eugene Sandulenko
6aec69231f JANITORIAL: Indentation fixes 2016-05-13 12:27:11 +02:00
Hubert Maier
0f11864e8a Fix identation again
I should stop c&p'ing
2016-04-29 17:13:44 +03:00
Hubert Maier
4bad45cfd6 Remove periods 2016-04-29 14:08:54 +03:00
Hubert Maier
3e756da308 Code Formatting fixes 2016-04-29 14:06:02 +03:00
Hubert Maier
d9d5ea40df AMIGAOS: Preparations for use with AmiUpdate
Adding a bit of code to make ScummVM AmiUpdate aware.
Everything else will be dealt with through a (yet to finish) AmigaOS installer script and the entries in AmiUpdate's database.

I'd like to ask for hints regarding
- Code Formatting
- Optimizations
- Comments
- Obivous errors
or
- Ill-designed code.

It's not much code, but i'm sure i still messed up glorious either way
2016-04-28 21:24:12 +03:00
Johannes Schickel
5340df3faf POSIX: Cleanup AudioCD manager creation. 2016-03-13 14:20:20 +01:00
Johannes Schickel
b32f347531 SDL: Get rid of reference to SDL 1.3.
We only support SDL 1.2 and SDL 2.
2016-03-13 14:07:56 +01:00
Matthew Hoops
2aa2a6b56c BACKENDS: Add a Win32 audio CD player 2016-03-13 13:56:51 +01:00
Matthew Hoops
a1a4fc0d51 BACKENDS: Add a Linux CD-ROM audio player 2016-03-13 13:56:28 +01:00
Matthew Hoops
47a82f2d1b BACKENDS: Add a custom Mac OS X CD audio manager
Since Mac OS X Carbon/Cocoa API isn't stable (in that it's changed multiple times over the years). Maintaining two versions of the same code (one in some foreign language with overly long names) isn't very appealing to me.
2016-03-13 13:53:55 +01:00
Matthew Hoops
55a87c59b6 BACKENDS: Use a virtual function for creating the SDL audio CD manager 2016-03-13 13:53:40 +01:00
Johannes Schickel
4ee3623f5d SDL: Fix compilation with SDL2 and MSVC2015. 2016-03-09 22:03:47 +01:00
Johannes Schickel
4145109937 AMIGAOS: Fix native build breakage caused by indented comments in amigaos.mk.
As pointed out by Raziel^.
2016-02-17 12:37:36 +01:00
Hubert Maier
89e9a36af5 AMIGAOS: Fix 'amigaosdist' for in-tree builds on AmigaOS.
AmigaOS's Rexx interpreter seems to have problems with './' in the path to the
Rexx script. We work around this by copying it to the cwd and using it from
there.

Manual merge of PR #669 "AMIGAOS: Fix amigaos.mk to make the rexx script work
on local builds".
2016-02-17 11:58:48 +01:00
Alexandre Detiste
6c298e964f JANITORIAL: Typos detected with lintian & grep 2016-02-15 18:27:02 +01:00
Johannes Schickel
655f4dfedb WIN32: Fix compilation with MinGW-w64 based Win32 compiler. 2016-02-12 19:22:47 +01:00
Johannes Schickel
1b21b8b906 AMIGAOS: Fix 'amigaosdist' target for out-of-tree builds. 2016-02-06 17:46:05 +01:00
Johannes Schickel
2622cded72 POSIX: Move assureDirectoryExists to posix-fs{.h,.cpp}. 2016-02-02 09:16:40 +01:00
Johannes Schickel
dde89c36f5 POSIX: Move default config file location to '$XDG_CONFIG_HOME/scummvm/scummvm.ini'.
This is what the XDG Base Directory Specification suggests to use. We still
use the old location of '~/.scummvmrc' in case that is present.

This tackles an aspect of bug #6036 "POSIX: Use XDG dirs instead of HOME".
2016-02-02 09:16:40 +01:00
Johannes Schickel
79acfd28e9 POSIX: Use modern path for log file.
This makes use use the XDG Base Directory Specification for the log file path.
This tackles one part of bug #6036 "POSIX: Use XDG dirs instead of HOME".
2016-02-02 09:16:40 +01:00
Johannes Schickel
b4e360188f POSIX: Restructure code in OSystem_POSIX::createLogFile. 2016-02-02 09:16:40 +01:00
Johannes Schickel
589c3046aa POSIX: Make assureDirectoryExists create full path if needed.
This is kind of like 'mkdir -p' now. But the permissions are different from
standard POSIX behavior.
2016-02-02 08:45:58 +01:00
Johannes Schickel
d8394d3f77 POSIX: Factor directory creation code into its own function. 2016-02-02 08:45:58 +01:00
Hubert Maier
1c1d3f35eb AMIGAOS: amigaos.mk - Revert rx command line
rx doesn't find the program if "./" or 	${srcdir} is kept in front.
Probably a limitation of abc-shell...or rx
2016-01-30 01:14:28 +02:00
Hubert Maier
171a39d698 AMIGAOS: amigaos.mk path fixes 2016-01-30 00:33:17 +02:00
Hubert Maier
30094b9d9a AMIGAOS: Fix the exe paths and delete the guide after installing 2016-01-29 19:00:31 +02:00
Hubert Maier
2893d28700 AMIGAOS: Update amigaos.mk to automatically create an AmigaGuide file from README 2016-01-29 18:17:42 +02:00
Thierry Crozat
ef62422e59 OSX: Fix menus when using SDL2
We remove the menus added by SDL before inserting our own menus,
but the code assumed that there were two SDL generated menus. SDL2
actually adds three menus. So the new code makes no assumptions on
the number of menus so that it works with both SDL1.2 and SDL2.

Also fix an issue on OS X 10.4 and earlier that caused the app menu
to be nameless.
2015-12-16 20:42:11 +00:00
Bastien Bouclet
aa9191c4c4 PS3: Remove the SDL2 mixer manager.
It was only used by the PS3 backend, and the standard SDL mixer was fixed
to work in the PS3 case.
2015-12-15 20:10:19 +01:00
Bastien Bouclet
b9a1074999 PS3: Make use of an updated SDL2 version
This version, available at https://bitbucket.org/bgK/sdl_psl1ght, is based on SDL 2.0.3.
2015-12-15 20:10:19 +01:00
vanfanel
66dbb7f485 SDL/DISPMANX: Remove dispmanx graphics output. 2015-12-08 21:41:40 +01:00
vanfanel
9d831d0c42 SDL/DISPMANX Fixed small issues with merging: Use append_var, fix spacing issues and changed SurfaceSdlGraphicsManager constructor call parameters on DispmanXSdlGraphicsManager constructor. 2015-11-12 14:03:14 +01:00
vanfanel
99739a13fe Merge branch 'master' into dispmanx 2015-11-11 17:56:12 +01:00
vanfanel
37e157a11c SDL/DISPMANX Make additional notes on README.RASPBERRYPI telling users to manually disable some features that are sub-optimal on the Pi when they don't pass a host parameter 2015-10-20 21:15:26 +02:00
vanfanel
c2c95cc95b SDL/DISPMANX Fixed dispmanx activation parameter on README.RASPBERRYPI 2015-10-19 12:12:54 +02:00
vanfanel
c362119572 SDL/DISPMANX Renamed the RASBERRYPI define to the less confusing name of DISPMANX because it controls whether dispmanx rendering backend is enabled or not on the Raspberry Pi. 2015-10-18 20:25:53 +02:00
Kirben
8f9245cfce WIN: Fix mingw64 compilation, by limiting last hack. 2015-10-08 11:02:40 +11:00
Kirben
7e81052150 WIN: Add hack for command line display in Windows versions built with MinGW. 2015-10-08 10:46:05 +11:00
vanfanel
b706ca36f1 SDL/DISPMANX: Updated class member names, configure script and asociated files and docs to conform to fingolfin's corrections. 2015-07-22 13:00:45 +02:00
vanfanel
bf68de9aa7 RASPBERRYPI: Changed the RGB code for the game screen surface and added RaspberryPi information file. 2015-07-20 17:13:19 +02:00
vanfanel
08a3376ba7 RASPBERRYPI: Added Raspberry Pi native 2D API support (dispmanx) 2015-03-29 21:52:53 +02:00
Filippos Karapetis
6cb0a4c1b0 SDL: Fix compilation with SDL 2.0 under MSVC
In SDL 2.0, intrin.h is now included in SDL_cpuinfo.h, which includes
setjmp.h. SDL_cpuinfo.h is included from SDL.h and SDL_syswm.h.
Thus, we remove the exceptions for setjmp and longjmp before these two
includes.
2015-03-06 02:57:09 +02:00
Matthew Hoops
5936f7c9d1 MACOSX: Fix compilation
Broken by 3f22c12
2015-03-05 08:02:54 -05:00
Johannes Schickel
066e71f61a SDL: Call setupIcon for each window creation with SDL2.
This should make sure that the logo is properly set on Win32 with SDL2.
2015-03-01 16:21:53 +01:00
Johannes Schickel
71cc9e41e8 WINCE: Fix compilation. 2015-02-18 05:24:45 +01:00
Johannes Schickel
3745ddbefd WIN32: Add experimental SDL2 support.
Based on changes by aquadran.
2015-02-16 02:13:11 +01:00
Johannes Schickel
3f22c12c56 SDL: Handle icon setup in SdlWindow. 2015-02-16 01:25:22 +01:00
Johannes Schickel
627d766325 SDL: Add basic abstraction class for the SDL window. 2015-02-16 01:03:29 +01:00
Johannes Schickel
8d57b766a9 SDL: Fix typo. 2015-01-25 21:11:18 +01:00
Johannes Schickel
8530997fff SDL: Add experimental support for SDL2.
This is based upon skristiansson's change set to make ScummVM work with SDL2.
2015-01-25 20:23:25 +01:00
Johannes Schickel
d97889cea7 SDL: Cleanup graphics manager switching a bit. 2015-01-25 19:26:15 +01:00
Johannes Schickel
3a2db0135d SDL: Refactor WM specific functionality into SdlGraphicsManager. 2015-01-25 18:57:38 +01:00
Filippos Karapetis
d2c69a79fe BACKENDS: Remove trailing whitespace 2014-10-28 15:38:51 +02:00
raziel-
01dc551e87 AMIGAOS: Make use of the new drawer icon
On AmigaOS the user can customize every icon including drawers.

This is a customized drawer icon for ScummVM with the original "S"
scaled on top of it.

This icon may change with further revisions of AmigaOS4 (if the
default icon images change).
2014-09-07 10:09:05 +01:00
raziel-
cbae401a79 AMIGAOS: Add a stack cookie
Setting up a static stack to avoid crashes from a stack set too low.
2014-08-08 13:43:59 +01:00
raziel-
38f7a9bc70 AMIGAOS: Cleanup of the AmigaOS version number 2014-08-08 14:05:23 +03:00
D G Turner
469eecb9ee BUILD: Add port specific makefile for AmigaOS4.
This moves the AmigaOS4 specific packaging rules from the global
ports.mk to a port specific makefile in the AmigaOS subdirectory of
the SDL backend (used for AmigaOS).

Previously, port specific makefiles were only used for cross compiling
builds and thus had a single entry in the cross compiling section of
the configure. Since AmigaOS4 is a desktop system supporting native
build, this required a second entry for when the host system is detected
as ppc-amigaos to support native builds.

However, currently this does break packaging of cross compiled builds
for Win32, OSX and Unix when done on AmigaOS4... but this is not likely
and has limited impact. To fix this, default _port_mk lines would need
to be added to the sections of the cross compiling switch for mingw32
etc. to override the AmigaOS4 OS setting of _port_mk.
2014-07-20 04:18:46 +01:00
Bastien Bouclet
bf90ad0467 BUILD: Move the PS3 make targets to a separate file 2014-06-28 17:12:43 +02:00
Matthew Hoops
7af36e9724 BACKENDS: Fix invalid buffer size in CFStringGetCString call 2014-06-01 17:02:18 -04:00
Thierry Crozat
6d7fcdd2b5 OSX: Implement TaskbarManager for Mac OS X
This implements count badge, progress bar, and icon overlay.
It uses the NSDockTile API which is available since OS X 10.5.
The code compiles and run on older system but without doing
anything.
2014-02-23 21:54:47 +00:00
Johannes Schickel
63304ee9ec SDL: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
D G Turner
fc80f5a346 SDL: Move debugging code to output SDL video driver name to initBackend.
The initBackend() function is called later after the command line is
parsed and thus debug() prints can be used, which are much less noisy.
2014-02-16 16:33:35 +00:00
D G Turner
2589228329 SDL: Add debugging code to output SDL video driver name being used. 2014-02-12 12:11:53 +00:00
Johannes Schickel
2fe303ce3f Merge pull request #409 from lordhoto/rtti
Enable RTTI and clean up the code by exploiting the availability of dynamic_cast.
2014-01-23 15:23:12 -08:00
Johannes Schickel
4412e12deb BUILD: Rename libunity support variable to "USE_UNITY" instead of "USE_TASKBAR_UNITY".
This makes it consistent with other library support variables.
2014-01-21 19:01:28 +01:00
D G Turner
8b9d4348f8 SDL: Fix bug where config file path could exceed maximum path length.
The fix is the change in the MAXPATHLEN check, but have also migrated
this to Common::String to make the fix easier.

Thanks to klusark for pointing out this problem.
2013-11-14 18:35:03 +00:00
Kirben
3950dad947 SDL: Remove misleading comments, based on incomplete information at MSDN. GetLocalInfo is supported on Windows 95 onwards, but MSDN fails to mention older Windows versions. 2013-11-11 23:53:53 +11:00
Johannes Schickel
919e577ba6 SDL: Fix invalid memory access in getSystemLanguage.
A call to setlocale can invalidate the string a previous setlocale call
returned. Instead of saving a pointer we copy the returned string now. This,
for example, fixes invalid memory access on my system.

See de8da01b0e for the commit introducing the
invalid memory access.
2013-11-03 18:47:03 +01:00
D G Turner
de8da01b0e SDL: Remove side effect of setlocale() call to get Language.
This is to fix bug #3615148 -  "ALL: sscanf("%f"), atof() etc. not
portable due to Locale"

The side effect of setlocale("") is to change the active locale
from the default of "C" to the detected system locale, but this
changes the behaviour of sscanf() and several other functions
in a system dependent and non-portable way. This has caused
bugs in the ZVISION engine when running Zork Nemesis.

The solution is to restore the default "C" locale after the call
to get the language.

Thanks to criezy for working out this fix.
2013-11-03 17:10:18 +00:00
Johannes Schickel
ea6d38d5f3 SDL: Make activateManager/deactivateManager SdlGraphicsManager specific.
We can do this now that we can use virtual inheritance and dynamic_cast
because we enabled RTTI.
2013-10-24 00:06:32 +02:00
Johannes Schickel
092d36f392 SDL: Reduce code duplication a bit.
Now instead of initializing this in OSystem_SDL::initSDL (and in subclasses
overwriting this) we simply initialize it in OSystem_SDL::init.
2013-10-23 22:59:13 +02:00
Johannes Schickel
c323dedf3c SDL: Fix default graphics mode for switchable case.
The former code (incorrectly) assumed that the getDefaultGraphicsMode returns
the index in the table returned by getSupportedGraphicsModes. Now the correct
ID is searched and then used.
2013-10-23 22:59:09 +02:00
Johannes Schickel
d34c9d5bcb SDL: Do not require a static graphics mode list in OpenGL and SurfaceSDL. 2013-10-23 22:59:06 +02:00
Johannes Schickel
a9cb67df08 SDL: Only allow switching of SurfaceSDL <-> OpenGL when no custom manager is used. 2013-10-23 22:59:02 +02:00
Johannes Schickel
38543f772c SDL: Make setupGraphicsModes non-virtual.
The logic of switching the managers is pretty much fixed at the same level
and cannot be easily overwritten.
2013-10-23 22:58:57 +02:00
Johannes Schickel
17cb26b93c SDL: Simplify initial graphics manager selection for OpenGL. 2013-10-23 22:58:53 +02:00
Johannes Schickel
4080a7a3f6 SDL: Get rid of _glModesCount. 2013-10-23 22:58:50 +02:00
Johannes Schickel
c5e2b5158c SDL: Get rid of loop in OSystem_SDL::setGraphicsMode. 2013-10-23 22:58:46 +02:00