Commit graph

110 commits

Author SHA1 Message Date
Martin Gerhardy
a0c237f7b9 EVENTRECORDER: added new event for OSystem::getTimeAndDate 2021-07-09 19:23:21 +02:00
Le Philousophe
851282af60 IPHONE/IOS7: Fix compilation 2021-06-25 09:20:27 +02:00
Cameron Cawley
cdc00c41be IOS7: Remove unneeded use of Graphics::ColorMasks 2021-06-24 11:55:54 +02:00
Martin Gerhardy
5af1192580 BACKENDS: fixed segfault in EventRecorder with buffer out of bounds writes
==3124361== Invalid write of size 8
==3124361==    at 0x483F803: memmove (vg_replace_strmem.c:1270)
==3124361==    by 0x4DBF61: SurfaceSdlGraphicsManager::grabOverlay(void*, int) const (surfacesdl-graphics.cpp:1753)
==3124361==    by 0x482051: ModularGraphicsBackend::grabOverlay(void*, int) (modular-backend.cpp:215)
==3124361==    by 0x434EE1: GUI::ThemeEngine::clearAll() (ThemeEngine.cpp:376)
==3124361==    by 0x40128E: GUI::EventRecorder::preDrawOverlayGui() (EventRecorder.cpp:558)
==3124361==    by 0x481DB2: ModularGraphicsBackend::updateScreen() (modular-backend.cpp:173)
==3124361==    by 0x559967: Graphics::Screen::updateScreen() (screen.cpp:62)
==3124361==    by 0x55991C: Graphics::Screen::update() (screen.cpp:56)
==3124361==    by 0x38AFC7: TwinE::TwineScreen::update() (twine.cpp:126)
==3124361==    by 0x3B8759: TwinE::Screens::adjustPalette(unsigned char, unsigned char, unsigned char, unsigned int const*, int) (screens.cpp:150)
==3124361==    by 0x3B8A89: TwinE::Screens::fadeToPal(unsigned int const*) (screens.cpp:207)
==3124361==    by 0x3B8403: TwinE::Screens::loadImage(int, int, bool) (screens.cpp:80)
==3124361==  Address 0x31453050 is 16 bytes after a block of size 512,000 alloc'd
==3124361==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==3124361==    by 0x55B38C: Graphics::Surface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (surface.cpp:75)
==3124361==    by 0x551111: Graphics::ManagedSurface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (managed_surface.cpp:153)
==3124361==    by 0x4352D5: GUI::ThemeEngine::setGraphicsMode(GUI::ThemeEngine::GraphicsMode) (ThemeEngine.cpp:453)
==3124361==    by 0x434A52: GUI::ThemeEngine::init() (ThemeEngine.cpp:324)
==3124361==    by 0x43501B: GUI::ThemeEngine::refresh() (ThemeEngine.cpp:394)
==3124361==    by 0x405780: GUI::GuiManager::screenChange() (gui-manager.cpp:603)
==3124361==    by 0x405C6B: GUI::GuiManager::processEvent(Common::Event const&, GUI::Dialog*) (gui-manager.cpp:677)
==3124361==    by 0x404EBA: GUI::GuiManager::runLoop() (gui-manager.cpp:429)
==3124361==    by 0x3FD847: GUI::Dialog::runModal() (dialog.cpp:77)
==3124361==    by 0x36D747: launcherDialog() (main.cpp:106)
==3124361==    by 0x36FF92: scummvm_main (main.cpp:552)

It looks like the _videoMode.overlayHeight in SurfaceSdlGraphicsManager::grabOverlay and ThemeEngine::_backBuffer::h are somehow out of sync after
starting the game in a different resolution as the gui was started with. So the overlayHeight is updated - but the backbuffer (Surface) is not resized.

This is with event recorder being active - right after starting the game and switching the resolution.
2021-06-19 14:34:52 +02:00
Thierry Crozat
dce06f179c IOS7: Render the GUI in HiDPI 2021-05-24 23:46:51 +01:00
Thierry Crozat
37aa9f9081 IOS7: Support using 4bpp cursors
This fixes an assert with the new GUI (bug #12578).

This also required changing the logic to handle the cursor key color
as the new GUI does not use that key color but use the alpha channel.
The logic in the iOS backend was overwriting the alpha channel
by checking the key color, removing all the transparency. Now the
two are combined (hopefully there is no case were it uses the key
color while also using a pixel format with alpha, but not setting
this alpha, because if there is, this will now result in a fully
transparent cursor).
2021-05-24 23:46:51 +01:00
Orgad Shaneh
a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Cameron Cawley
a1890ede9c BASE: Avoid calling PluginMan.getEngineFromMetaEngine where possible 2021-04-05 15:33:23 +01:00
Cameron Cawley
a38103fb23 IOS7: Remove scaler code 2021-03-15 16:48:40 +02:00
Eugene Sandulenko
5936026209 ALL: Clarify POTFILES, remove redundant common/translations.h includes 2020-11-10 03:03:49 +01:00
Cameron Cawley
0d4625d2d5 IOS7: Make use of ModularMutexBackend 2020-11-09 19:12:33 +00:00
Thierry Crozat
7cf5cefb06 IOS7: Fix transparency with RGB cursors using a key color 2020-10-11 03:56:11 +01:00
Thierry Crozat
3fc7fc285e IOS7: Add override keyword for OSystem_iOS7 functions 2020-10-11 02:24:31 +01:00
Thierry Crozat
271713cf69 IOS7: Fix reimplementation of OSystem::setGraphicsMode
The signature of the function changed during the ResidualVM merge,
but the iOS7 backend was not updated and still used the old signature.
2020-10-11 02:18:05 +01:00
Thierry Crozat
e83586006a IOS7: Remove include that is no longer needed
This fixes the compilation because of common/types.h that defines
YES and NO which are already defined in Objective-C.
2020-10-11 01:44:39 +01:00
Cameron Cawley
31be074893 BACKENDS: Add a function to return if the overlay is visible 2020-09-15 00:09:11 +02:00
Thierry Crozat
53bb50c906 IOS7: Do not overwrite user saves when saving state 2020-09-13 00:21:36 +01:00
Thierry Crozat
c50ffd74c6 IOS7: Properly restore state when the process has been terminated 2020-09-13 00:21:36 +01:00
Thierry Crozat
63627dc26d IOS7: Save state as a background task when entering background
This is better than using an hardcoded delay for two main reasons.
The first one is that the application can terminate as soon as it
has finished saving the state, and the second one is that it will
still work if saving the state takes longer than the delay that
was hardcoded.
2020-09-13 00:21:35 +01:00
Thierry Crozat
28e9910666 IOS7: Implement game state save/restore when switching tasks
This only works if the running engines can save the game at the
time when ScummVM goes to the background.
This should partially fix bug #7871.
2020-09-13 00:21:35 +01:00
Thierry Crozat
7c812a52f1 IOS7: Call pauseEngine() when suspending the application 2020-09-13 00:21:35 +01:00
Thierry Crozat
e3c1fece97 IOS7: Fix compilation 2020-08-30 14:43:41 +02:00
Thierry Crozat
1e8cb29a54 IOS7: Fix memory leak and compilation for copy to clipboard 2020-08-30 14:43:41 +02:00
aryanrawlani28
a647812bfb iOS: Use U32 for clipboards. 2020-08-30 14:43:41 +02:00
Thierry Crozat
3baad9e2a4 IOS7: Hide virtual keyboard input assistant bar 2020-08-29 16:31:37 +01:00
Cameron Cawley
7745ffdac1 BACKENDS: Simplify EventsBaseBackend 2020-08-24 14:22:35 +02:00
Cameron Cawley
2e6de7ee3f BACKENDS: Replace use of bzero() 2020-07-26 23:55:28 +01:00
Thierry Crozat
298c61844a IOS7: Use abort() instead of exit() for the Fatal error message view 2020-04-26 16:19:37 +01:00
Thierry Crozat
a5bad37f17 IOS: Use abort() instead of exit() 2020-04-26 16:19:37 +01:00
Thierry Crozat
4efcecb986 IOS7: Log error messages to the system error log facility 2020-04-26 16:19:37 +01:00
Thierry Crozat
be6372df9c IOS7: Remove exit for normal application termination
With the kFeatureNoQuit being now used, it should not get
there anyway.
2020-04-26 16:19:37 +01:00
Thierry Crozat
8958fe0f7b IOS7: Add support for kFeatureNoQuit 2020-04-26 16:19:37 +01:00
Thierry Crozat
5585d77e5e IOS7: Use screen scale to scale the overlay
This should result in a consistent overlay size whatever the pixel
density is for the device.
2020-04-16 22:05:35 +01:00
Thierry Crozat
98b7095527 IOS7: Fix implementation of getMillis()
The documentation indicates that it should return the number of
milliseconds since the application started. It was however using
a different reference (last boot of the device minus the sleep time)
resulting in a much bigger value than expected.
2020-02-01 22:56:25 +00:00
Cameron Cawley
2048c9cc78 AUDIO: Remove unused parameter from the MixerImpl constructor 2019-11-30 17:47:34 +02:00
sluicebox
42217b5852 IOS7: Implement horizontal shake 2019-11-19 00:20:40 +01:00
sluicebox
b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
Stefan Will
67abb355f1 IOS7: enable home indicator auto-hide on iPhone X and up
This makes the annoying white line at the bottom of the screen go away
on newer (home button-less) iPhones.

2887510-prefershomeindicatorautohidden
2019-10-19 18:04:53 +03:00
sluicebox
e8f009e04f IOS: Call exit(0) when exiting to prevent hanging
Prevents the process from hanging on exit when using the
Quit button in launcher or a game's quit function
2019-09-10 13:02:28 +03:00
Thierry Crozat
fa9651d1bb IOS7: Make sure openURL is executed on the main thread 2019-08-04 20:40:22 +01:00
Thierry Crozat
468c0f0743 IOS7: Implement isConnectionLimited 2019-08-04 19:03:34 +01:00
Thierry Crozat
cd7bf2b09f IOS7: Implement getSystemLanguage 2019-08-04 19:03:34 +01:00
Thierry Crozat
160070347f IOS7: Move non-video related functions to a separate file 2019-08-04 19:03:34 +01:00
Thierry Crozat
c505a7b4bb IOS7: Implement opening a URL 2019-08-04 19:03:34 +01:00
Thierry Crozat
0ddcb9de7b IOS7: Implement copy to clipboard and paste from clipboard 2019-08-04 19:03:34 +01:00
Thierry Crozat
d8cb826b19 IOS7: Add back mapping of LF character to the Return key
This is necessary for properly identifying the Return key pressed from
the software or a hardware keyboard, and this was erronously removed
in commit e5709ed.
2019-07-07 11:06:28 +01:00
Thierry Crozat
cfd66173ba IOS7: Hide input accessory toolbar when an external keyboard is connected 2019-07-06 17:00:27 +01:00
Thierry Crozat
bf92167007 IOS7: Add a tab key to the keyboard accessory view 2019-06-30 12:36:43 +01:00
Thierry Crozat
25ff69c250 IOS7: Use scrollview for keyboard accessory view
This allows to have more buttons than what can be displayed on the
screen, and now to have all the same buttons on iPhone and on iPad.
2019-06-30 12:36:43 +01:00