mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 08:19:56 -04:00
Make every settings menu row work for Ocarina and give the controls Ocarina's actions and keys.
The Screen tab hides Game resolution when the build has no output and scene patch sets, and the resolution code no longer grows the memory pool for it. FSR sharpness now also runs when the game image is shrunk to the window, which is always the case for Ocarina's 2560x1440 picture at 1920x1080, and the overlay drops NX2navi's fixed 3D scene size. A colour profile set in nx2navi.ini now applies without the menu. The Game tab hides the frame limit in builds without frame-rate patch sets and lists the game languages the RomFS ships, adding Polish and Brazilian Portuguese. 5.1 sound is reported to the game's virtual output device. The remap page describes each button as Ocarina's controls screen does, gives each D-pad direction its own description and drops NX2navi's shake row; the keyboard defaults follow Ocarina (Shift dashes on A, Ctrl puts away on B, O and N for the ocarina and Navi, middle mouse resets the camera). docs/controls.md is updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -174,9 +174,13 @@ static uint64_t shadow_kib(void) {
|
||||
return R.shadow > SHADOW_BASE ? ((uint64_t)R.shadow * R.shadow - SHADOW_BASE * SHADOW_BASE) * 8 * 3 / 1024 : 0;
|
||||
}
|
||||
|
||||
// The generated C carries the output and scene patch sets (NX2navi's builds). Without them (Ocarina) the game draws at its
|
||||
// own sizes whatever the settings say, so nothing grows for them: no larger pool or HeapDef, no grown sizes reported.
|
||||
int res_adjustable(void) { return rt_patch_set("output") >= 0 && rt_patch_set("scene") >= 0; }
|
||||
|
||||
static int bigger(void) {
|
||||
decide();
|
||||
return R.ow != BASE_W || R.oh != BASE_H || R.scene_set || shadow_kib();
|
||||
return res_adjustable() && (R.ow != BASE_W || R.oh != BASE_H || R.scene_set || shadow_kib());
|
||||
}
|
||||
|
||||
uint64_t res_heap_extra_kib(void) {
|
||||
@@ -320,16 +324,17 @@ static void res_shadow_range(void) {
|
||||
|
||||
void res_init(void) {
|
||||
res_shadow_range();
|
||||
if (!res_adjustable()) {
|
||||
rt_log("resolution: the game's own (this build has no output and scene patch sets; output_res and render_scale "
|
||||
"do nothing)");
|
||||
return;
|
||||
}
|
||||
if (!bigger()) {
|
||||
rt_log("resolution: the game's own (output 1920x1080, scene 1600x900)");
|
||||
shadow_init(rt_patch_page());
|
||||
return;
|
||||
}
|
||||
int output = rt_patch_set("output"), scene = rt_patch_set("scene");
|
||||
if (output < 0 || scene < 0) {
|
||||
rt_log("resolution: the generated C has no output and scene patch sets; the game keeps its own resolution");
|
||||
return;
|
||||
}
|
||||
fs_init(); // romfs.c serves the grown HeapDef from here on (res_heapdef_served)
|
||||
if (res_heap_extra_kib() && !R.heapdef_ok) { // sizes at or below the shipped ones fit the shipped heaps
|
||||
rt_log("resolution: no grown HeapDef table; the game keeps its own resolution");
|
||||
|
||||
Reference in New Issue
Block a user