Commit graph

164 commits

Author SHA1 Message Date
Nekotekina b49a1f27eb Warning fixes 2022-09-17 16:35:02 +03:00
Megamouse ff34a73fbd cellSaveData: CELL_SAVEDATA_FOCUSPOS_NEWDATA
Untested, but focus position is clamped anyway.
2022-03-18 08:09:50 +01:00
Eladash fd6c33980b
cellSaveData: Check filename format of savedata files (#11502) 2022-02-14 22:03:40 +03:00
Megamouse cc21d1b3cf cellSaveData: prevent some potential crashes due to corrupt files 2021-12-14 20:30:47 +01:00
Megamouse 22e3075c64 cellSaveData: always log setList and setBuf
For debugging
2021-11-20 08:43:46 +01:00
Megamouse 09ead539a5 improvise CELL_SAVEDATA_ERRDIALOG_NOREPEAT 2021-11-20 08:43:46 +01:00
Eladash a5c3c7d2e5
cellSaveData/UNIX: Optimize IO (#10574) 2021-07-18 21:08:04 +02:00
Eladash 6f6503ee32 cellSaveData: Fixup funcDone result check 2021-07-17 23:30:26 +02:00
Nekotekina 3c614d95b8 fs: alternative fs::pending_file implementation (Win32)
Use MOVEFILE_WRITE_THROUGH instead of sync() on commit().
2021-06-20 22:08:24 +03:00
Ani a49446c9e9
Replace gsl::span for std::span (c++20) (#7531)
* Replace gsl::span for std::span (c++20)
* Replace gsl::byte with std::byte

Co-authored-by: Bevan Weiss <bevan.weiss@gmail.com>
2021-05-30 17:10:46 +03:00
Nekotekina 160b131de3 types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.

Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Nekotekina 1d0f6eebdc Improve error_code (new formatting constructor)
Minor cleanup in formatting utilities.
2021-05-19 22:41:16 +03:00
Megamouse 3c37036f7a save-overlays: add entry size info 2021-04-30 00:30:26 +02:00
Megamouse 14b6d6291b save-overlays: add localization 2021-04-30 00:30:26 +02:00
Megamouse 11f57f259c cellSaveData: keep focus after confirmation cancel
It was very annoying to be thrown to beginning of the list after cancelling the confirmation.
2021-04-30 00:30:26 +02:00
Megamouse 087dccd194 Implement most of cellUserInfo 2021-04-23 05:50:19 +03:00
Megamouse 03b76b4606 Emu: some cleanup 2021-04-09 21:03:49 +02:00
Megamouse 43ac33c2b4 cellSaveDataEnableOverlay 2021-03-18 11:11:34 +03:00
Eladash 1213708b72
Replace some log errors (#9980) 2021-03-17 17:19:35 +03:00
Nekotekina 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
GitArUs f8097a428c
Allow games to list all savedata (#9547)
* cellSaveData - allow games to list all savedata, not only those they own.

Co-authored-by: Megamouse <studienricky89@googlemail.com>
2021-03-06 16:01:04 +03:00
Nekotekina ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Nekotekina 090a769bf6 Implement fs::sync (Linux/POSIX) 2021-02-23 18:24:50 +03:00
Nekotekina 014846cf31 cellSaveData: fix minor issues 2021-02-23 18:24:50 +03:00
Eladash d4af8dd89a Fix atomicity of savedata/trophy data writes 2021-02-23 11:29:23 +03:00
Eladash 932f31e37b Atomic PARAM.SFO writes 2021-02-23 11:29:23 +03:00
Eladash eb0d006168
Fix most of "[x] thread is too sleepy" at Emu.Stop() (#9813)
* Fixes some thread sleep/wait calls
2021-02-21 16:43:02 +03:00
Eladash f43260bd58
Atomic waiting refactoring (#9208)
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117)
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Nekotekina db8e6fe7a7 Enable -Wunused-variable 2021-01-12 14:34:14 +03:00
Megamouse 52deff06ba
Random stuff (#9589)
* minor coding style adjustment

* Qt: simplify osk dialog buttons

* replace std::find_if with convenience functions

* RSX: use sv in swizzle comparison

idk, I'll remove this if it was intentional.

* overlays/osk: rename enter to return

This one confused me and make me look for a bug that caused the "enter" key to be disabled, while it was actually the return key (obviously xD).
2021-01-12 12:59:50 +03:00
Nekotekina eec11bfba9 Move align helpers to util/asm.hpp
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
Nekotekina fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Nekotekina b382d3b3e9 Remove ASSUME macro
It's dangerous and sometimes bluntly misused feature.
Its optimization potential is near-zero.
2020-12-10 14:08:02 +03:00
Nekotekina 36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Megamouse 2cee26c3e7 Cleanup some includes 2020-10-31 11:53:46 +01:00
Eladash b8fa6fb4c4 Win32 FS: Rewrite (fix) vfs::host::rename 2020-09-24 18:06:51 +03:00
Eladash 2620a51cc9 cellSaveData: Minor fix 2020-09-19 13:53:04 +01:00
Megamouse a2da187615 HLE: localize most - if not all - exposed strings 2020-09-14 18:24:18 +02:00
Eladash 0c85d4c0d0
cellSaveData: Fix loss of "BLIST" and files' information in PARAM.SFO (#8706) 2020-08-08 23:40:47 +01:00
Eladash 54b87b6dbb cellSaveData: Increase sleep time 2020-07-23 13:45:58 +03:00
Eladash ab9cdc70ad cellSaveData: Emulate PPU processing of auto/list post-fixed callback 2020-06-25 19:50:33 +03:00
Eladash 01cafc042d cellSaveData: Ensure savedata_context members are 16-byte aligned
I saw stvx v128{0} (aligned 16-bytes store) usage on the first 16-bytes of CellSaveDataCBResult before funcStat in fw.
Also I saw 4 stw of u32{0} on it as well before funcFile, funcFixed and funcList.
So just add the resets for result before all callbacks, and make all
members of savedata_ontext 16 -byte aligned in case there are more
members guaranteed to be aligned.
2020-03-21 19:05:20 +03:00
Eladash ceaee0ec68 cellSaveData: Clear traces of setList setup from setBuf->buf, add missing memset
* Always memset 0 setBuf->buf (to bufSize) before funcStat if the direcory is not new.
* Always memset 0 setBuf->buf (to bufSize) if listGet->dirNum became non-zero (listGet->dirListNum can be zero yet memset still occurs) .
* Clear traces of setList setup before funcStat (after funcFixed/List, only if listGet->dirNum != 0, callback can hack this value and prevent the memset).
2020-03-21 19:05:20 +03:00
Eladash b6a288d383 cellSaveData: Skip directory items in savedata_get_list_item 2020-03-21 19:05:20 +03:00
Eladash be0e586671 cellSaveData: Add error checks for cellSaveData(User)GetListItem 2020-03-21 19:05:20 +03:00
Eladash 66916df4ae cellSaveData: Set listSet->focusPosition to LISTHEAD by default 2020-03-21 19:05:20 +03:00
Eladash fae46bf194 cellSaveData: Add CELL_SAVEDATA_ERROR_NOUSER 2020-03-21 19:05:20 +03:00
Eladash c3d36940c7 cellSaveData: do not allow to read/write/delete system files in funcFile
Return param error 70 as realhw in this case.
2020-03-14 16:12:18 +03:00
Eladash db71d4852a cellSaveData: Fix adding file entries to PARAM.SFO on error 2020-03-14 16:12:18 +03:00