From 6c5423ceed84e609e5c56eba2090c91f76919d78 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Tue, 6 Dec 2022 15:07:04 +0000 Subject: [PATCH 1/3] app/emulator_window: store recent.toml in storage root This makes it consistent with the config file. --- src/xenia/app/emulator_window.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xenia/app/emulator_window.cc b/src/xenia/app/emulator_window.cc index bee44ba6e..4d2789be4 100644 --- a/src/xenia/app/emulator_window.cc +++ b/src/xenia/app/emulator_window.cc @@ -1137,7 +1137,7 @@ void EmulatorWindow::FillRecentlyLaunchedTitlesMenu( } void EmulatorWindow::ReadRecentlyLaunchedTitles() { - std::ifstream file("recent.toml"); + std::ifstream file(emulator()->storage_root() / "recent.toml"); if (!file.is_open()) { return; } @@ -1198,7 +1198,8 @@ void EmulatorWindow::AddRecentlyLaunchedTitle( toml_table->end(); // Open and write serialized data. - std::ofstream file("recent.toml", std::ofstream::trunc); + std::ofstream file(emulator()->storage_root() / "recent.toml", + std::ofstream::trunc); file << *toml_table; file.close(); } From df368691cda75ddd2b3e7f55976381ec7de30286 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Tue, 6 Dec 2022 15:06:30 +0000 Subject: [PATCH 2/3] xenia-build: find clang-format in VS installation --- xenia-build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xenia-build b/xenia-build index c521a9504..576acbc41 100755 --- a/xenia-build +++ b/xenia-build @@ -47,6 +47,7 @@ def import_subprocess_environment(args): 'systemroot', 'temp', 'tmp', + 'vcinstalldir', 'windowssdkdir', ) for line in variables.splitlines(): @@ -436,6 +437,8 @@ def get_clang_format_binary(): 'clang-format-13', 'clang-format', ] + if 'VCINSTALLDIR' in os.environ: + attempts.append(os.path.join(os.environ['VCINSTALLDIR'], 'Tools', 'Llvm', 'bin', 'clang-format.exe')) for binary in attempts: if has_bin(binary): return binary From 24e7e5429ac3cc3fb32faf328f8339b32df40913 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Tue, 6 Dec 2022 05:10:07 +0000 Subject: [PATCH 3/3] xb: allow py.exe launcher --- xb.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xb.bat b/xb.bat index 9b828cb12..458d516d8 100644 --- a/xb.bat +++ b/xb.bat @@ -40,7 +40,8 @@ SET "CANDIDATE_PATHS[1]=C:\python39\python.exe" SET "CANDIDATE_PATHS[2]=C:\python38\python.exe" SET "CANDIDATE_PATHS[3]=C:\python37\python.exe" SET "CANDIDATE_PATHS[4]=C:\python%PYTHON_MINIMUM_VERSION[0]%%PYTHON_MINIMUM_VERSION[1]%\python.exe" -SET OUTPUT_INDEX=5 +SET "CANDIDATE_PATHS[5]=C:\Windows\py.exe" +SET OUTPUT_INDEX=6 FOR /F "usebackq delims=" %%L IN (`2^>NUL where python3`) DO ( IF %%~zL NEQ 0 (