Add UI
This commit is contained in:
@@ -422,6 +422,8 @@ struct Values {
|
||||
std::string yuzu_username;
|
||||
std::string yuzu_token;
|
||||
|
||||
bool shaggie;
|
||||
|
||||
// Add-Ons
|
||||
std::map<u64, std::vector<std::string>> disabled_addons;
|
||||
} extern values;
|
||||
|
||||
@@ -2759,7 +2759,10 @@ void CachedSurface::UploadGLMipmapTexture(u32 mip_map, GLuint read_fb_handle,
|
||||
if (tuple.compressed) {
|
||||
switch (params.target) {
|
||||
case SurfaceTarget::Texture2D:
|
||||
Shaggizise();
|
||||
glCompressedTextureSubImage2D(
|
||||
texture.handle, mip_map, 0, 0, static_cast<GLsizei>(params.MipWidth(mip_map)),
|
||||
static_cast<GLsizei>(params.MipHeight(mip_map)), tuple.internal_format, image_size,
|
||||
&gl_buffer[mip_map][buffer_offset]);
|
||||
break;
|
||||
case SurfaceTarget::Texture3D:
|
||||
glCompressedTextureSubImage3D(
|
||||
@@ -2803,7 +2806,14 @@ void CachedSurface::UploadGLMipmapTexture(u32 mip_map, GLuint read_fb_handle,
|
||||
tuple.format, tuple.type, &gl_buffer[mip_map][buffer_offset]);
|
||||
break;
|
||||
case SurfaceTarget::Texture2D:
|
||||
Shaggizise();
|
||||
if (Settings::values.shaggie) {
|
||||
Shaggizise();
|
||||
} else {
|
||||
glTextureSubImage2D(texture.handle, mip_map, x0, y0,
|
||||
static_cast<GLsizei>(rect.GetWidth()),
|
||||
static_cast<GLsizei>(rect.GetHeight()), tuple.format,
|
||||
tuple.type, &gl_buffer[mip_map][buffer_offset]);
|
||||
}
|
||||
break;
|
||||
case SurfaceTarget::Texture3D:
|
||||
glTextureSubImage3D(texture.handle, mip_map, x0, y0, 0,
|
||||
|
||||
@@ -373,6 +373,7 @@ void Config::ReadValues() {
|
||||
ReadSetting("use_accurate_gpu_emulation", false).toBool();
|
||||
Settings::values.use_asynchronous_gpu_emulation =
|
||||
ReadSetting("use_asynchronous_gpu_emulation", false).toBool();
|
||||
Settings::values.shaggie = ReadSetting("shaggie", false).toBool();
|
||||
|
||||
Settings::values.bg_red = ReadSetting("bg_red", 0.0).toFloat();
|
||||
Settings::values.bg_green = ReadSetting("bg_green", 0.0).toFloat();
|
||||
@@ -649,6 +650,7 @@ void Config::SaveValues() {
|
||||
WriteSetting("use_accurate_gpu_emulation", Settings::values.use_accurate_gpu_emulation, false);
|
||||
WriteSetting("use_asynchronous_gpu_emulation", Settings::values.use_asynchronous_gpu_emulation,
|
||||
false);
|
||||
WriteSetting("shaggie", Settings::values.shaggie, false);
|
||||
|
||||
// Cast to double because Qt's written float values are not human-readable
|
||||
WriteSetting("bg_red", (double)Settings::values.bg_red, 0.0);
|
||||
|
||||
@@ -77,6 +77,7 @@ void ConfigureGraphics::setConfiguration() {
|
||||
ui->use_accurate_gpu_emulation->setChecked(Settings::values.use_accurate_gpu_emulation);
|
||||
ui->use_asynchronous_gpu_emulation->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
||||
ui->use_asynchronous_gpu_emulation->setChecked(Settings::values.use_asynchronous_gpu_emulation);
|
||||
ui->d3d15->setChecked(Settings::values.shaggie);
|
||||
UpdateBackgroundColorButton(QColor::fromRgbF(Settings::values.bg_red, Settings::values.bg_green,
|
||||
Settings::values.bg_blue));
|
||||
}
|
||||
@@ -93,6 +94,7 @@ void ConfigureGraphics::applyConfiguration() {
|
||||
Settings::values.bg_red = static_cast<float>(bg_color.redF());
|
||||
Settings::values.bg_green = static_cast<float>(bg_color.greenF());
|
||||
Settings::values.bg_blue = static_cast<float>(bg_color.blueF());
|
||||
Settings::values.shaggie = ui->d3d15->isChecked();
|
||||
}
|
||||
|
||||
void ConfigureGraphics::UpdateBackgroundColorButton(QColor color) {
|
||||
|
||||
@@ -49,6 +49,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="d3d15">
|
||||
<property name="text">
|
||||
<string>Enable D3D15 with jaggies</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="use_disk_shader_cache">
|
||||
<property name="text">
|
||||
|
||||
Reference in New Issue
Block a user