Enhance Abseil integration and improve Windows font loading functionality

- Added additional Abseil flags modules to the CMake configuration for better support.
- Refactored Windows-specific font loading code to avoid namespace conflicts by using the `::` prefix for Windows API calls.
- Improved error handling and ensured proper memory management when retrieving font paths from the Windows registry.
This commit is contained in:
scawful
2025-09-28 01:42:46 -04:00
parent 5aa9fde4a4
commit 2a39cc644e
4 changed files with 47 additions and 33 deletions

View File

@@ -434,7 +434,11 @@ class ModernCLI {
} // namespace cli
} // namespace yaze
#ifdef _WIN32
extern "C" int SDL_main(int argc, char* argv[]) {
#else
int main(int argc, char* argv[]) {
#endif
absl::SetProgramUsageMessage(
"z3ed - Yet Another Zelda3 Editor CLI Tool\n"
"\n"

View File

@@ -24,7 +24,11 @@ DEFINE_FLAG(std::string, length, "", "The length of the data to read.");
DEFINE_FLAG(std::string, file_size, "", "The size of the file to expand to.");
DEFINE_FLAG(std::string, dest_rom, "", "The destination ROM file.");
#ifdef _WIN32
extern "C" int SDL_main(int argc, char *argv[]) {
#else
int main(int argc, char *argv[]) {
#endif
yaze::util::FlagParser flag_parser(yaze::util::global_flag_registry());
RETURN_IF_EXCEPTION(flag_parser.Parse(argc, argv));
yaze::cli::ShowMain();