Skip to content

Commit

Permalink
Removed the menu settings for enabling/disabling line width scaling.
Browse files Browse the repository at this point in the history
Removed nv2a_vsh_cpu, glslang, SPIRV-Reflect, volk, and VulkanMemoryAllocator.
  • Loading branch information
faha223 committed Nov 15, 2024
1 parent 49d5a3d commit 961e99b
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 49 deletions.
3 changes: 0 additions & 3 deletions config_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ display:
surface_scale:
type: integer
default: 1
scale_lines:
type: bool
default: true
window:
fullscreen_on_startup: bool
fullscreen_exclusive: bool
Expand Down
2 changes: 0 additions & 2 deletions hw/xbox/nv2a/nv2a.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ void nv2a_gl_context_init(void);
int nv2a_get_framebuffer_surface(void);
void nv2a_set_surface_scale_factor(unsigned int scale);
unsigned int nv2a_get_surface_scale_factor(void);
bool nv2a_get_line_width_scaling_enabled(void);
void nv2a_set_line_width_scaling_enabled(bool enable);
const uint8_t *nv2a_get_dac_palette(void);
int nv2a_get_screen_off(void);

Expand Down
35 changes: 6 additions & 29 deletions hw/xbox/nv2a/pgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -3913,8 +3913,12 @@ void nv2a_gl_context_init(void)
g_nv2a_context_display = glo_context_create();
}

static void apply_surface_scale_changes(NV2AState *d)
void nv2a_set_surface_scale_factor(unsigned int scale)
{
NV2AState *d = g_nv2a;

g_config.display.quality.surface_scale = MAX(1, scale);

qemu_mutex_unlock_iothread();

qemu_mutex_lock(&d->pfifo.lock);
Expand Down Expand Up @@ -3947,46 +3951,19 @@ static void apply_surface_scale_changes(NV2AState *d)
qemu_mutex_lock_iothread();
}

void nv2a_set_surface_scale_factor(unsigned int scale)
{
NV2AState *d = g_nv2a;

g_config.display.quality.surface_scale = MAX(1, scale);

apply_surface_scale_changes(d);
}

unsigned int nv2a_get_surface_scale_factor(void)
{
return g_nv2a->pgraph.surface_scale_factor;
}

void nv2a_set_line_width_scaling_enabled(bool enable)
{
NV2AState *d = g_nv2a;

g_config.display.quality.scale_lines = enable;

apply_surface_scale_changes(d);
}

bool nv2a_get_line_width_scaling_enabled()
{
return g_config.display.quality.scale_lines;
}

static void pgraph_reload_surface_scale_factor(NV2AState *d)
{
d->pgraph.surface_scale_factor = MAX(1, g_config.display.quality.surface_scale);
}

static void pgraph_reload_line_width(NV2AState *d)
{
float lineWidth = 1.0f;

if (g_config.display.quality.scale_lines)
lineWidth = (float)MAX(1, g_config.display.quality.surface_scale);

float lineWidth = (float)MAX(1, g_config.display.quality.surface_scale);
glLineWidth(lineWidth);
}

Expand Down
1 change: 0 additions & 1 deletion hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu
Submodule nv2a_vsh_cpu deleted from d5a730
1 change: 0 additions & 1 deletion subprojects/glslang
Submodule glslang deleted from e8dd0b
1 change: 0 additions & 1 deletion thirdparty/SPIRV-Reflect
Submodule SPIRV-Reflect deleted from 1d674a
1 change: 0 additions & 1 deletion thirdparty/VulkanMemoryAllocator
Submodule VulkanMemoryAllocator deleted from 009ecd
1 change: 0 additions & 1 deletion thirdparty/volk
Submodule volk deleted from 466085
7 changes: 1 addition & 6 deletions ui/xui/main-menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,7 @@ void MainMenuDisplayView::Draw()
"Increase surface scaling factor for higher quality")) {
nv2a_set_surface_scale_factor(rendering_scale+1);
}
bool scale_lines = nv2a_get_line_width_scaling_enabled();
if(Toggle("Scale Line Widths", &scale_lines,
"Scale Line Widths to match Internal resolution scale")) {
nv2a_set_line_width_scaling_enabled(scale_lines);
}


SectionTitle("Window");
bool fs = xemu_is_fullscreen();
if (Toggle("Fullscreen", &fs, "Enable fullscreen now")) {
Expand Down
4 changes: 0 additions & 4 deletions ui/xui/menubar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,6 @@ void ShowMainMenu()
ImGui::SameLine();
HelpMarker("Controls how the rendered content should be scaled "
"into the window");
bool scale_lines = nv2a_get_line_width_scaling_enabled();
if(ImGui::MenuItem("Scale Lines", SHORTCUT_MENU_TEXT(Alt + L), &scale_lines, true)) {
nv2a_set_line_width_scaling_enabled(scale_lines);
}
ImGui::Combo("Aspect Ratio", &g_config.display.ui.aspect_ratio,
"Native\0Auto\0""4:3\0""16:9\0");
if (ImGui::MenuItem("Fullscreen", SHORTCUT_MENU_TEXT(Alt + F),
Expand Down

0 comments on commit 961e99b

Please sign in to comment.