151 Commits

Author SHA1 Message Date
f55e8a42cc GCC nonstring fixes 2025-04-19 19:53:52 -07:00
5ccbf0d225 AsyncIOPosix: Add mode_t argument to open 2025-04-19 19:53:51 -07:00
d65bef16ed Fix corrupted memory cards 2025-04-19 19:53:51 -07:00
Lioncash
6401b0baea Util: Make operator|= and &= constexpr for bitwise enums
Maintains parity with hecl's version of the macro, etc.
2025-04-19 19:53:50 -07:00
Lioncash
2b1bfa0422 Card: Make querying functions const member functions where applicable
These don't modify member state, so they can be made const .
2025-04-19 19:53:50 -07:00
Lioncash
d02e783905 Directory: Make indexForFile() a const member function
This doesn't modify instance state, so it can be turned into a const
member function.
2025-04-19 19:53:50 -07:00
Lioncash
74d071e9c7 Card: Use UINT32_MAX for FileHandle's default initializer
Avoids a sign conversion
2025-04-19 19:53:50 -07:00
Lioncash
7c01ada2e6 General: Use explicit where applicable
Makes conversions explicit in order to prevent error-prone implicit
conversions.
2025-04-19 19:53:50 -07:00
Lioncash
72457c3246 General: Use std::array for constructors where applicable
Same behavior, but ensures input absolutely satisfies the total amount
of data that needs to be copied.
2025-04-19 19:53:50 -07:00
Lioncash
b7a5e3b36c Directory: Avoid use of unnamed struct in union
Anonymous structs have a limitation on GCC when involving non-trivial
default constructors, as it's a compiler extension and not actually
standard C++ to use anonymous structs. We can give the struct a concrete
name, which fixes this issue.
2025-04-19 19:53:50 -07:00
Lioncash
42c4ae8daa Revert "Revert "General: Use std::array where applicable""
This reverts commit 698e37d6a41770f53d1a9e9f5c4559102a4b2ad5.
2025-04-19 19:53:50 -07:00
c037818600 Revert "General: Use std::array where applicable" 2025-04-19 19:53:50 -07:00
Lioncash
ee3ea90954 Card: Eliminate a few hardcoded constants 2025-04-19 19:53:50 -07:00
Lioncash
62b03a7cde Card: Zero out game array within setCurrentGame for nullptr
Previously this was zeroing out the maker array, which it shouldn't be
doing.
2025-04-19 19:53:50 -07:00
Lioncash
8895960bad General: Use std::array where applicable
Same behavior, but with stronger typing. We can also eliminate usages of
magic values in some places.
2025-04-19 19:53:50 -07:00
8ff4d91f3f Add missing include 2025-04-19 19:53:50 -07:00
Lioncash
7a813a7365 General: Avoid indirect includes
Ensures all inclusions are made where necessary.
2025-04-19 19:53:49 -07:00
Lioncash
8ae9da65e5 Card: Amend doxygen comments
Amends broken or missing doxygen parameters. While we're at it, we can
expand the documentation a little bit to be somewhat more explanatory
about the functions.
2025-04-19 19:53:46 -07:00
Jack Andersen
7001f40f22 Make stuff constexpr 2025-04-19 19:53:46 -07:00
Jack Andersen
2a463de413 Windows build fixes 2025-04-19 19:53:45 -07:00
Jack Andersen
8017bdf6c8 Better CMake dependency handling 2025-04-19 19:53:41 -07:00
13e6688ed9 Fix raw pointer bug 2025-04-19 19:53:40 -07:00
8c4d6d4210 Prevent garbage data from being written to memcard 2025-04-19 19:53:40 -07:00
Jack Andersen
4e6db26c9f Add True and False tests for bitwise enums 2025-04-19 19:53:40 -07:00
Jack Andersen
9d5c25978d Minor bitwise enum macro change 2025-04-19 19:53:40 -07:00
Jack Andersen
8ce7a33f65 New code style refactor 2025-04-19 19:53:40 -07:00
Jack Andersen
fe814771ce _SYS_STR macro fix 2025-04-19 19:53:40 -07:00
Jack Andersen
e67001ead9 Windows build fixes 2025-04-19 19:53:40 -07:00
Jack Andersen
0a640fada4 Convert to pragma once 2025-04-19 19:53:40 -07:00
Jack Andersen
6479678a82 Add public waitForCompletion method 2025-04-19 19:53:40 -07:00
2934952af0 Fix linux build 2025-04-19 19:53:40 -07:00
Jack Andersen
124d2edfbf Fix cardtest 2025-04-19 19:53:40 -07:00
Jack Andersen
474013b151 Implement Win32 AsyncIO 2025-04-19 19:53:40 -07:00
Jack Andersen
83bf0a47d7 Use asynchronous I/O for Card access 2025-04-19 19:53:39 -07:00
Jack Andersen
1ae9444fe8 Huge compile performance refactor 2025-04-19 19:53:38 -07:00
Jack Andersen
3541696053 UWP fix 2025-04-19 19:53:38 -07:00
Jack Andersen
865165205d Windows fixes 2025-04-19 19:53:36 -07:00
Jack Andersen
53cd75525b string_view refactor 2025-04-19 19:53:35 -07:00
Jack Andersen
24cf526773 Use MoveFileEx for Win32 file renaming 2025-04-19 19:53:30 -07:00
Jack Andersen
62be64f1aa Windows fix 2025-04-19 19:53:30 -07:00
Jack Andersen
382abc6455 Checksum recalculate fix for getStatus() 2025-04-19 19:53:25 -07:00
Jack Andersen
a1f6ebb4ca Specify binary mode when reopening card file 2025-04-19 19:53:25 -07:00
Jack Andersen
3f7d937a05 Card writing bug fixes 2025-04-19 19:53:25 -07:00
Jack Andersen
aa37daf0f3 More stable index-flipping for write ops 2025-04-19 19:53:25 -07:00
06a19cd1d3 Revert file index 0 avoidance 2025-04-19 19:53:25 -07:00
Jack Andersen
537a8f684d FileHandle refactor 2025-04-19 19:53:25 -07:00
Jack Andersen
e60054ae91 Checksum and Card copy fixes 2025-04-19 19:53:25 -07:00
2bc1904fac Better block allocation handling 2025-04-19 19:53:25 -07:00
Jack Andersen
dbd81e6158 Ensure WideStringConvert.hpp is included 2025-04-19 19:53:25 -07:00
Jack Andersen
afdfb1642e Ensure CARD_UCS2 is conditionally defined 2025-04-19 19:53:25 -07:00