mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-27 18:52:11 -04:00
Things
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cmake -S recompiler -B recompiler/build -G Ninja -DCMAKE_BUILD_TYPE=Release && cmake --build recompiler/build
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=Release && cmake --build runtime/build --target psx-runtime
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
recompiler/build/psxrecomp-bios bios/SCPH1001.BIN generated --emit-full recompiler/seeds/phase2_ghidra_seeds.json
|
||||
@@ -1032,6 +1032,16 @@ UserSettings load_user_settings(const fs::path& path) {
|
||||
if (!v.empty()) { s.language = v; s.has_language = true; }
|
||||
});
|
||||
}
|
||||
if (doc.contains("launcher")) {
|
||||
const toml::value& lc = toml::find(doc, "launcher");
|
||||
if (lc.contains("ui_scale")) try_get([&]{
|
||||
const auto v = toml::find<std::string>(lc, "ui_scale");
|
||||
if (!v.empty()) {
|
||||
float val = std::stof(v);
|
||||
if (val >= 0.5f && val <= 2.0f) { s.ui_scale = val; s.has_ui_scale = true; }
|
||||
}
|
||||
});
|
||||
}
|
||||
if (doc.contains("controller")) {
|
||||
const toml::value& ct = toml::find(doc, "controller");
|
||||
if (ct.contains("p1_device")) try_get([&]{
|
||||
@@ -1127,8 +1137,9 @@ bool save_user_settings(const fs::path& path, const UserSettings& s) {
|
||||
f << "\n[audio]\n";
|
||||
if (s.has_spu_hq)
|
||||
f << "spu_hq = " << (s.spu_hq ? "true" : "false") << "\n";
|
||||
if (s.has_skip_launcher)
|
||||
if (s.has_skip_launcher || s.has_ui_scale)
|
||||
f << "\n[launcher]\nskip_launcher = " << (s.skip_launcher ? "true" : "false") << "\n";
|
||||
if (s.has_ui_scale) f << "ui_scale = " << s.ui_scale << "\n";
|
||||
if (s.has_bios_path)
|
||||
f << "\n[bios]\npath = \"" << fwd(s.bios_path) << "\"\n";
|
||||
if (s.has_disc_path)
|
||||
|
||||
@@ -620,6 +620,10 @@ struct UserSettings {
|
||||
// .language / g_lang). "off"/"jp"/"" = untranslated native game. Persisted to
|
||||
// settings.toml [localization].language.
|
||||
bool has_language = false; std::string language = "en";
|
||||
|
||||
// UI scale: launcher UI scale cycling (0.5 0.75 1.0 1.25 1.5 1.75 2.0).
|
||||
// Persisted to settings.toml [launcher].ui_scale.
|
||||
bool has_ui_scale = false; float ui_scale = 1.0f;
|
||||
};
|
||||
|
||||
// GameOptions — the game's OWN native OPTION-screen settings, declared in a
|
||||
|
||||
@@ -321,8 +321,10 @@ struct LauncherModel {
|
||||
std::string disc_file, disc_region, disc_serial, verdict_title, verdict_detail, verdict_state="none";
|
||||
bool v_header=false, v_crc=false, v_verified=false;
|
||||
|
||||
// display labels (computed from the values above)
|
||||
// launcher UI scale (persistent, 0.5..2.0)
|
||||
float uiscale = 1.0f;
|
||||
|
||||
// display labels (computed from the values above)
|
||||
std::string renderer_label, crt_label, texfilter_label, aspect_label, winsize_label, uiscale_label;
|
||||
|
||||
// keybind rebinding
|
||||
@@ -746,7 +748,7 @@ Result run(SDL_Window* window, void* gl_context,
|
||||
m.lock_device = game.lock_device;
|
||||
m.ws_offered = game.ws_offered;
|
||||
m.deadzone_pct = io.has_deadzone ? (io.deadzone * 100 / 32767) : 37;
|
||||
m.uiscale = 1.0f; // TODO: persist uiscale in UserSettings
|
||||
m.uiscale = io.has_ui_scale ? io.ui_scale : 1.0f;
|
||||
m.p1_dev_index = io.has_p1_device ? find_or_add_device_index(dev_opts, io.p1_device) : (dev_opts.size()>2?2:1);
|
||||
m.p2_dev_index = io.has_p2_device ? find_or_add_device_index(dev_opts, io.p2_device) : 0;
|
||||
refresh_player(m, 0, dev_opts);
|
||||
@@ -1191,7 +1193,7 @@ Result run(SDL_Window* window, void* gl_context,
|
||||
io.language = game.languages[m.lang_index].code;
|
||||
io.has_language = true;
|
||||
}
|
||||
// io.uiscale = m.uiscale; io.has_uiscale = true;
|
||||
io.ui_scale = m.uiscale; io.has_ui_scale = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -2696,6 +2696,7 @@ int main(int argc, char** argv) {
|
||||
seed.deadzone = resolved_deadzone >= 0 ? resolved_deadzone : 12000;
|
||||
seed.has_deadzone = true;
|
||||
seed.window_width = g_video_win_w; seed.has_window_width = true;
|
||||
// ui_scale: default to 1.0 (no config source yet, launcher reads from settings.toml)
|
||||
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
|
||||
Reference in New Issue
Block a user