mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 01:49:58 -04:00
Change a setting with the mouse only on the two framed arrows beside its value, and switch HDR without a restart.
In the settings menu a click anywhere on a row stepped its setting to the next value, and the left arrow stood left of the value's text, so it moved whenever a value of another width came up: clicking the left arrow through a list landed on the row at the second click and stepped the other way. Each stepper now has its arrows in white frames at fixed places, the left one the width of the row's widest value from the right one, and the mouse changes the value on those frames only; a click on the rest of the row selects it. On and off rows have the same arrows. An arrow at the end of its values is drawn faint and does nothing, and a button held on an arrow repeats as a held key does. A, Enter and left and right work as before. NX2NAVI_MENU_TEST_CLICK clicks rows by their setting's name during a menu test run. On an RX 7900 XT at 3232x1352 the arrows stepped the performance overlay one value a click and stopped at both ends, and clicks on the body of four rows changed nothing. HDR between off and the tone mapper now follows the menu. The HDR path is set up at every start (vk_hdr_armed): the swapchain colour space and metadata extensions, the tonemap splice and the settings in the support buffer, with the spliced tonemap returning the game's own SDR result while the swapchain is SDR. A change of the setting makes the swapchain again in the other format. On the same card a run that started with HDR off went to an HDR10 swapchain and back, and one that started with HDR on went to SDR and back, with the picture right in each state. The game's native HDR still waits for a restart, as the game asks about the display once, and the row says so. NX2NAVI_HDR_LIVE = 0 leaves the HDR path out of a run that starts with HDR off. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,7 @@ int wide_available(void);
|
||||
const char *const *vk_color_preset(const char *name);
|
||||
int vk_hdr_wanted(void);
|
||||
int vk_hdr_active(void);
|
||||
int vk_hdr_needs_restart(void);
|
||||
int vk_dlaa_needs_restart(void);
|
||||
double frame_step_limit_hz(void);
|
||||
int frame_limit_follows_display(void);
|
||||
@@ -500,6 +501,7 @@ extern "C" void menu_vk_release(void) {
|
||||
// NX2NAVI_MENU_TEST=<frame>[:<frames per page>]: at that presented frame the menu opens on its first tab; each tab stays
|
||||
// <frames per page> frames (default 30) and its last frame's swapchain image goes to NX2NAVI_MENU_TEST_DIR (default: the
|
||||
// working directory) as menu-test-<frame>-<page>.png; after the last tab the menu closes.
|
||||
// NX2NAVI_MENU_TEST_CLICK=<key>:<part>[,...]: mouse clicks on the rows of the page shown (ui/option_rows.cpp click_test).
|
||||
// NX2NAVI_MENU_TEST_SET=<frame>:<key>=<value>[,<key>=<value>...][;<frame>:...]: cfg_set of each key (NX2NAVI_ prefix
|
||||
// optional) at that presented frame; changes live settings with no input, menu open or not. nx2navi.ini is written only by
|
||||
// the pseudo-key SAVE=1 (cfg_save, as a row change does; a failed write shows the menu's save note).
|
||||
@@ -859,18 +861,20 @@ static void row_upscaling(void) {
|
||||
if (e.kind >= DLSS) opt_apply("NX2NAVI_TAA", e.kind == FSR3 ? "fsr3" : "dlss");
|
||||
}
|
||||
|
||||
// "in use: off" under the HDR value when the game started with HDR on but the swapchain is not HDR10 (the display or
|
||||
// Windows' HDR switch is off, vk_hdr_surface_format). The row's "after restart" comes from the setting itself (cfg.c).
|
||||
// Under the HDR value: "after restart" when what is set waits for one (the game's own HDR, to or from it:
|
||||
// vk_hdr_needs_restart), "in use: off" when HDR is on but the swapchain is not HDR10 (the display or Windows' HDR
|
||||
// switch is off, vk_hdr_surface_format).
|
||||
static const char *hdr_note(void) {
|
||||
if (vk_hdr_needs_restart()) return menu_text(UI_MENU_AFTER_RESTART);
|
||||
if (!vk_hdr_wanted() || vk_hdr_active() || !*gfx_window_present_mode() || !cfg_bool("NX2NAVI_HDR")) return nullptr;
|
||||
static char note[96];
|
||||
snprintf(note, sizeof note, menu_text(UI_MENU_PRESENT_IN_USE), menu_text(UI_MENU_FRAMEGEN_OFF));
|
||||
return note;
|
||||
}
|
||||
|
||||
// HDR (vk_hdr.c), after a restart: off, the HDR tone mapper over the game's picture or the game's native HDR. The
|
||||
// brightness rows follow while it is on; the tone mapper's own rows only with the first (native HDR is the game's
|
||||
// picture as it is), its grading rows only with its own curve chosen.
|
||||
// HDR (vk_hdr.c): off or the HDR tone mapper over the game's picture, switched at once, or the game's native HDR,
|
||||
// which the game takes up at its start. The brightness rows follow while it is on; the tone mapper's own rows only
|
||||
// with the first (native HDR is the game's picture as it is), its grading rows only with its own curve chosen.
|
||||
static void row_hdr(void) {
|
||||
static const char *const values[] = {"0", "1", "native"};
|
||||
const char *names[] = {menu_text(UI_MENU_FRAMEGEN_OFF), menu_text(UI_MENU_HDR_TONEMAPPED), menu_text(UI_MENU_HDR_NATIVE)};
|
||||
|
||||
Reference in New Issue
Block a user