mirror of
https://github.com/open-goal/jak-project
synced 2026-08-11 03:26:33 -04:00
Fix UTF-8 handling when running the game, env-vars, and setting the project path (#1632)
* fix utf-8 handling around env-vars * fix file opening errors related to unicode * add uncaught exception handler in `gk` to ensure something is logged * gracefully fail if window icon cant be loaded and work with unicode * linux fix and add changes to vendor file
This commit is contained in:
+4
-7
@@ -19,14 +19,11 @@
|
||||
// to make it easier to test a subset of tests
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
#ifdef _WIN32
|
||||
auto args = get_widechar_cli_args();
|
||||
std::vector<char*> string_ptrs;
|
||||
for (auto& str : args) {
|
||||
string_ptrs.push_back(str.data());
|
||||
fs::u8arguments u8guard(argc, argv);
|
||||
if (!u8guard.valid()) {
|
||||
std::cerr << "Bad encoding, needs UTF-8." << std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
argv = string_ptrs.data();
|
||||
#endif
|
||||
|
||||
// hopefully get a debug print on github actions
|
||||
setup_cpu_info();
|
||||
|
||||
Reference in New Issue
Block a user