Commit graph

101 commits

Author SHA1 Message Date
Cameron Cawley
3c5d806894 3DS: Log all messages to a file 2021-08-24 01:51:59 +02:00
Le Philousophe
68a327ecb1 BACKENDS: Harden grabOverlay in all platforms
Use specific copy code where applicable and replace duplicated code by
calls to copyBlit which optimizes blitting
2021-08-04 13:27:07 +02:00
Thierry Crozat
ec06d940a2 BACKENDS: Explicitly use ellipsis for OSD text if needed
This is the default, so this commit does not change the behaviour.
But this will allow to change the default at a later stage.
2021-08-01 17:22:13 +02:00
Martin Gerhardy
a0c237f7b9 EVENTRECORDER: added new event for OSystem::getTimeAndDate 2021-07-09 19:23:21 +02:00
Michael Ball
eab82da166 3DS: Resolve leftover signedness issues
Resolves leftover signedness issues to conform to baccbedf50.
2021-07-09 00:02:36 +01:00
Michael Ball
a8b7e1b2ee 3DS: Update README.md
- [`devkitpro-pkgbuild-helpers` is now deprecated in favor of `dkp-toolchain-vars`](f2fa934947 (diff-1ad351cc587a0b9fc4008f8094e8935e2b4c2a3063b1e470c37c4fdeac92f105)). The `devkitarm.sh` and `3dsvars.sh` files are still in `/opt/devkitpro/`.
 - Update Section 4.1.2 with values from [`devkitarm.sh`](https://github.com/devkitPro/pacman-packages/blob/master/dkp-toolchain-vars/devkitarm.sh) and [`3dsvars.sh`](https://github.com/devkitPro/pacman-packages/blob/master/dkp-toolchain-vars/3dsvars.sh)
2021-07-05 00:57:00 +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
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
1d5f475c30 3DS: Rename the _3DS namespace 2021-02-15 02:58:15 +02:00
Cameron Cawley
c877097b49 ALL: Remove use of "" in Common::U32String constructors 2020-11-16 16:56:58 +00:00
Matthew Duggan
5135f1f4b9 ALL: Run optipng to reduce png file size 2020-11-01 21:34:03 +09:00
Cameron Cawley
5a47b09455 BACKENDS: Move default implementations of getScreenPixelBuffer into BaseBackend 2020-10-10 18:00:17 +02:00
Eugene Sandulenko
bc4a1aed62 3DS: Fix compilation 2020-10-10 02:18:17 +02:00
Bastien Bouclet
fb39b94384 3DS: Start ScummVM in a separate thread
Allows to have a larger stack than that of the main thread.

Fixes #11717
2020-09-20 16:33:45 +02:00
Cameron Cawley
31be074893 BACKENDS: Add a function to return if the overlay is visible 2020-09-15 00:09:11 +02:00
aryanrawlani28
dfc53b60e3 3DS: Use U32Strings for options dialog. 2020-08-30 14:43:41 +02:00
aryanrawlani28
3fc336300f 3DS: Use U32Strings for displaying OSD Messages 2020-08-30 14:43:41 +02:00
Cameron Cawley
7745ffdac1 BACKENDS: Simplify EventsBaseBackend 2020-08-24 14:22:35 +02:00
Bastien Bouclet
1de6764891 3DS: Use the 800x240px graphics mode for the top screen
The extra horizontal resolution results in much improved visuals
for hi-resolution games.
2020-07-19 17:41:05 +02:00
Bastien Bouclet
4825e9f967 3DS: Upgrade to libctru v2.0.0 2020-07-19 17:41:05 +02:00
Bastien Bouclet
5b69df78d4 3DS: Fix potential integer overflow in circle pad handling 2020-07-19 17:41:05 +02:00
Bastien Bouclet
0a567b6058 3DS: Implement OSystem::kFeatureFilteringMode 2020-07-19 17:41:05 +02:00
Bastien Bouclet
8ccb564772 3DS: Fix crash when quitting with the home button when a game is started
Fixes #11512.
2020-06-22 21:10:41 +02:00
Philippe Valembois
3be555db01 3DS: Don't use auto as it's a C++11ism
That makes build fail when using -ansi
2020-05-30 19:43:13 +02:00
mataniko
321a02aff2 JANITORIAL: Rename shouldRTL, resetRTL and FORCE_RTL 2020-05-12 10:36:38 +02:00
Bastien Bouclet
dad5571592 3DS: Fix crash when closing the console while the 3DS options dialog is open 2020-05-11 18:29:08 +02:00
Eugene Sandulenko
ca25a95e2c 3DS: Remove extra dereferencing 2020-05-11 08:31:36 +02:00
Eugene Sandulenko
449f895680 3DS: Fix compilation 2020-05-11 07:45:46 +02:00
Eugene Sandulenko
4f30f26d80 3DS: Fix compilation 2020-05-11 01:51:15 +02:00
Henrik "Henke37" Andersson
e73fd6b2cd 3DS: Use PauseToken 2020-05-11 01:35:03 +02:00
Bastien Bouclet
9cc2fee887 SDL: Enable joystick input by default
Game controller input is now enabled whenever a compatible device is
connected. The keymapper's keymaps are refreshed when a joystick is added
or removed.

Fixes #10366.
2020-03-16 18:41:27 +01:00
Bastien Bouclet
cd173c8739 3DS: Use the shared virtual mouse 2020-03-09 20:00:31 +01:00
Bastien Bouclet
606a68172d 3DS: Set a translation context for the 3DS screen strings
So they can have dedicated translations.

Fixes #11371.
2020-02-28 05:46:36 +01:00
Bastien Bouclet
e1358b966a 3DS: Defer texture updates when the palette changes
Fixes a performance issue with the Gob engine where the palette is
updated a large number of times during a single frame.
2020-02-14 06:21:46 +01:00
Bastien Bouclet
6218028f02 3DS: Add a note in the readme about using an older version of freetype2 2020-02-13 07:57:02 +01:00
Bastien Bouclet
2177e685b7 KEYMAPPER: Allow joystick half axes to be remapped 2020-02-09 08:34:16 -06:00
Bastien Bouclet
e4d17f881c 3DS: Convert RGB555 pixels to RGBA5551 when copying to the texture
It's faster than using Graphics::Surface::convertTo
2020-02-07 18:33:56 +01:00
Michael Ball
b08ab0e130 3DS: Implement dynamic graphics modes to improve performance
When launching a game, switch the graphics mode if necessary
(and by extension the pixel formats used for Graphics::Surfaces
and Sprites) to the one that most closely matches the pixel format
used in-game.

Additional Fixes:
- Fix to prevent cursor position from changing when exiting a menu.
- Fix to prevent updating of Magnification viewport position when
virtual keyboard is open.
- Cosmetic code fixes for improper whitespace and missing curly brackets.
- Remove RGB8 as a mode option because:
  1) It was already commented out in the master 3DS backend.
  2) There are currently no games that explicitly require it.

Notes:
- As these graphics modes are automatically implemented on a per-game basis, they
are meant for backend use only and are purposefully not accessible through the
Options menu.
- RGBA8 (aka RGBA8888) remains the default pixel format, being used for the launcher
menu, CLUT8, and for games which do not specify a particular format.
2020-02-07 18:33:56 +01:00
Bastien Bouclet
99b9db456a 3DS: Disable newlib buffered io and use ScummVM's implementation
Fixes #11342.
2020-02-07 18:33:56 +01:00
Bastien Bouclet
81aedefad0 3DS: Fix libcurl detection 2020-02-01 09:36:10 +01:00
Bastien Bouclet
a13ce39538 3DS: Fix keymap defaults to match documentation 2020-02-01 09:36:10 +01:00
Bastien Bouclet
78ab571519 3DS: Update the port to take advantage of the new keymapper 2020-01-29 08:51:30 +01:00
Bastien Bouclet
b0d0dd1bbe 3DS: Enable GDB host IO 2019-12-31 05:29:37 +01:00
Bastien Bouclet
2c6dedaec8 3DS: Add missing makefile dependency
Make cannot automatically deduce that the shader assembler generates the
.h file that is required to build osystem-graphics.cpp.
2019-12-25 08:59:17 +01:00
Cameron Cawley
e92ac655be BACKENDS: Add default implementation for GraphicsMode functions 2019-12-15 16:06:56 +02:00
Cameron Cawley
0edf2da7ba
3DS: Fix compilation 2019-12-14 18:42:37 +00:00
Cameron Cawley
c3c3137ab3 BACKENDS: Move nextHigher2() into common/algorithm.h 2019-12-14 17:09:18 +02:00
Bastien Bouclet
34e835a20c 3DS: Implement dynamic plugins
Allows a full build to run on old generation devices
2019-12-01 17:19:50 +01:00
Michael Ball
6f678e6e84 3DS: Prevent magnify effect from updating while the GUI is active 2019-11-30 18:53:23 +01:00