87 Commits

Author SHA1 Message Date
Henrik Rydgård f14c4dfb90 Add a compatibility flag to apply sum2012's workaround for Ghost Recon: Predator
I'm not confident in the behavior here, so let's change it only for this
game for now.

Replaces #20892

Fixes #20856
2025-10-21 15:23:12 +02:00
Henrik Rydgård d1e5b45b4b Consolidate the last spread-out error codes. 2025-02-04 12:34:49 -06:00
Henrik Rydgård b2b0ff1753 Consolidate error codes in ErrorCodes.h 2025-02-04 11:53:00 -06:00
Henrik Rydgård c91169e702 Restore removed <algorithm> includes.
Turns out these were needed after all. For some reason, on Windows and
Mac, <algorithm> gets auto-included by something else so I don't notice
when it's missing, and MSVC's include dependency tracker doesn't see it
either.
2024-12-19 09:53:07 +01:00
Henrik Rydgård 3e198c53b2 More include cleanup 2024-12-18 13:57:26 +01:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Bobby Smith 133e9e37ae Crash fix for some games 2024-02-23 01:37:07 +01:00
Henrik Rydgård c5791764d8 Make the i18n T function use std::string_view
Buildfixes, crashfixes

One more

Android buildfix

Buildfix Qt
2024-02-12 18:44:39 +01:00
Herman Semenov af41281761 [Core/Dialog/ELF/FileSystems/HLE/HW/Util] Added const reference for function params 2023-12-14 14:22:24 +03:00
Henrik Rydgård ee6234ecb6 I18N: Switch to getting categories by index instead of by string lookup
Also gets rid of the shared_ptr usage, and generally makes things nicer.

Needed for later config refactorings, good to get in early.
2023-04-07 10:35:01 +02:00
Unknown W. Brackets fcc1abc7c3 Dialog: Update by button flag consistently.
Always check for the flag to change in Update().
2023-02-08 19:02:37 -08:00
Unknown W. Brackets ffbd9bbe98 Global: Fix some int/size_t conversion warnings. 2022-03-13 12:03:48 -07:00
Unknown W. Brackets 88fe2e9863 Dialog: Use dialog type header more consistently. 2021-02-27 13:43:12 -08:00
Unknown W. Brackets aa13f5afb7 Dialog: Track type id on dialog class. 2021-02-27 12:01:52 -08:00
Unknown W. Brackets e7b968be73 Debugger: Notate Memcpys directly as well. 2021-02-15 15:01:23 -08:00
vnctdj 5dd71db818 Improve some i18n things
- reuse some translations
- move some strings to a more suitable category

I will adapt the lang .ini files accordingly.
2021-01-09 18:50:00 +01:00
Henrik Rydgård ff8148dd92 Move native/util, native/data and native/i18 to Common/Data.
Also move colorutil.cpp/h

linking build fix experiment

Delete a bunch of unused CMakeLists.txt files

CMakeLists.txt linking fix

Don't include NativeApp.h from any headers.

Android.mk buildfix

Half of the UWP fix

Buildfix

Minor project file cleanup

Buildfixes

Guess what? More buildfixes!
2020-10-04 07:28:29 +02:00
Unknown W. Brackets b8342fb8ec SaveState: Rename ChunkFile files to Serialize.
Makes more sense and less weird than ChunkFileDoMap, etc.
2020-08-10 08:04:05 +00:00
Unknown W. Brackets 4b4e3432cd SaveState: Split Do() into a separate header. 2020-08-10 08:03:41 +00:00
Unknown W. Brackets f16a6b8abd MsgDialog: Show better error messages.
I think the PSP really did just show error codes, but that's not a reason
to keep that confusion going.  For common save errors, let's show the
messages.

Some games, for example, simply show the no data found error when you play
for the first time and trigger anything to check for data.
2020-07-13 18:24:05 -07:00
Unknown W. Brackets 3daf536e3c MsgDialog: Allow text to be wider.
Our font is a bit different, let's add a bit more as long as the spacing
looks okay.  Reduce scale if there's a lot of non-ASCII, since the PSP's
font seemed to use smaller glyphs than ours for those chars.
2020-07-13 18:24:05 -07:00
Unknown W. Brackets b181a93e5e MsgDialog: Add scrollbar when message is long.
Some games hard wrap their messages, and PSP firmware also showed a
scrollbar.  Let's do the same.

One intentional difference: trying to ensure we always show part of a
hidden line to make it clear to the user that there's more text.
2020-07-13 18:24:05 -07:00
Unknown W. Brackets 143ba22097 PPGe: Handle text shadows more consistently.
Don't really want them wrapping differently or etc.  Let's handle
centrally so we can make them consistent and better.
2020-07-13 18:20:57 -07:00
Unknown W. Brackets 4f586f9567 PPGe: Left align messages in dialogs.
It was previously left aligned, but the TextDrawer was being told to
center.  These are meant to just center the enclosing box of text, not the
individual lines within.

Makes Final Fantasy 3 look a lot better.
2020-05-23 19:59:56 -07:00
Unknown W. Brackets dbc78b437e PPGe: Fix dialog button positioning.
The measure was previously the line height, but always ultimately used
as the full text height.  This just makes it always full height.
2020-03-23 18:23:35 -07:00
Henrik Rydgård e97e3c4218 THe proposed Hive Sweeper fix in #11025 looks right, let's just commit it.
Probably helps #11025.
2020-03-10 00:01:28 +01:00
Henrik Rydgård 45d94c4877 Switch all images to dynamic lookup in the atlas by string ID.
SLN fix

It works, but with the wrong images and the wrong characters!

Fix another bug in atlastool's binary output

Get Android building again.

Oops, didn't mean to disable this permanently.

Error checking

Minor cleanup

Gotta tweak my git ignores...

Regenerate metadata
2020-03-01 12:06:47 +01:00
Unknown W. Brackets 5009698cc0 Core: Use a shared_ptr for i18n categories.
This does not make them thread safe, but it reduces the chances of a crash
a bit (see #12594.)
2020-02-09 07:35:16 -08:00
Henrik Rydgård bd71af24db Fix some minor things found looking at Valgrind output 2019-02-27 13:42:00 +01:00
Unknown W. Brackets 9a5fbe5ea5 Savedata: Truncate detail if it's too long.
We could add scrolling later, but this makes it more usable without ugly
text overlap, at least.

Fixes #11711.
2019-02-16 14:52:01 -08:00
Henrik Rydgård 21fe73c8e7 Switch strncpy to truncate_cpy in a bunch of places. 2017-05-26 19:04:08 +02:00
vnctdj d7eba2061e Consistently use *di for the Dialog i18n category 2015-07-01 23:26:55 +02:00
Unknown W. Brackets 2450724be2 Make Memory::Memcpy() execute memchecks directly.
This makes it easier to handle breakpoints in HLE.
2015-04-05 18:09:20 -07:00
Unknown W. Brackets 00491bb33b Process msgdialog abort on Update().
Matches tests.
2014-09-27 00:13:11 -07:00
Unknown W. Brackets bdf94a8909 Delay init/shutdown for msgdialogs as well. 2014-02-08 17:44:13 -08:00
Unknown W. Brackets 77acd0729f Use the latch in dialogs throughout.
This makes it so that rapid fire works for them as well.
2014-02-02 15:48:29 -08:00
sum2012 b08cef4353 Fix logic 2014-01-31 17:18:53 +08:00
sum2012 ee5912bc5c Fix formating 2014-01-31 15:58:22 +08:00
sum2012 4c4d7c7a14 Move to PSPMSgDialog 2014-01-31 15:00:05 +08:00
Unknown W. Brackets 05ad9721d9 Allow msgdialog override of ok/cancel button text.
Per tests, and hints from JPCSP.
2014-01-23 01:02:41 -08:00
Unknown W. Brackets bcdcd528b2 Validate options in MsgDialog v3 per tests. 2014-01-23 00:41:42 -08:00
Unknown W. Brackets fa1c5e0f87 Oops, only reset MsgDialog result on success. 2014-01-23 00:41:26 -08:00
Unknown W. Brackets 278359b208 Set msgdialog result to 0 after displayed.
This might fix anything checking the result code without zeroing it first.
2014-01-22 08:18:56 -08:00
Unknown W. Brackets f74e29977f Abort on a message dialog just moves to finished.
Still need to shutdown.  Fixes #5177.
2014-01-22 08:17:21 -08:00
Henrik Rydgard 1ec0a977e4 Fix too-slow fade in/out of save dialogs and others in 30hz games. 2013-10-16 18:54:40 +02:00
Unknown W. Brackets 50e9e45d65 Check version in each DoState() func.
They bail on PointerWrap error or bad version.
2013-09-14 20:23:03 -07:00
Henrik Rydgard 8c88dff5a4 More log categories, use them (and existing ones). Improve log config. 2013-09-07 22:02:55 +02:00
Unknown W. Brackets 0b5bdeb1d3 Fix some compile failures under big endian. 2013-07-28 21:04:17 -07:00
raven02 e75f647bc4 Fix the YES/OK/No button sizing and code cleanup 2013-07-29 00:31:01 +08:00
raven02 4c9422088b Only show OK button when (flag & DS_OK) in message dialog 2013-07-21 17:52:04 +08:00