mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-04 11:23:12 +00:00
Fix build
This commit is contained in:
Vendored
+1
-1
@@ -213,7 +213,7 @@ if (ENABLE_RESHADE)
|
||||
${reshade_SOURCE_DIR}/source/effect_symbol_table.cpp
|
||||
)
|
||||
|
||||
target_include_directories(reshadefx PUBLIC ${reshade_SOURCE_DIR}/source)
|
||||
target_include_directories(reshadefx SYSTEM PUBLIC ${reshade_SOURCE_DIR}/source)
|
||||
target_include_directories(reshadefx PRIVATE ${RESHADEFX_SHIM_DIR})
|
||||
target_link_libraries(reshadefx PUBLIC SPIRV-Headers::SPIRV-Headers)
|
||||
|
||||
|
||||
@@ -104,11 +104,11 @@ FxUniformDesc DescribeUniform(const reshadefx::uniform& info) {
|
||||
desc.components = std::min<u32>(info.type.components(), 4);
|
||||
|
||||
if (info.type.is_boolean()) {
|
||||
desc.kind = FxUniformKind::Bool;
|
||||
desc.kind = FxUniformKind::Boolean;
|
||||
} else if (info.type.is_integral()) {
|
||||
desc.kind = FxUniformKind::Int;
|
||||
desc.kind = FxUniformKind::Integer;
|
||||
} else {
|
||||
desc.kind = FxUniformKind::Float;
|
||||
desc.kind = FxUniformKind::Floating;
|
||||
}
|
||||
|
||||
desc.label = AnnotationString(info.annotations, "ui_label");
|
||||
@@ -120,11 +120,11 @@ FxUniformDesc DescribeUniform(const reshadefx::uniform& info) {
|
||||
desc.ui_type = ParseUiType(AnnotationString(info.annotations, "ui_type"));
|
||||
desc.items = SplitItems(AnnotationString(info.annotations, "ui_items"));
|
||||
|
||||
if (desc.kind == FxUniformKind::Bool) {
|
||||
if (desc.kind == FxUniformKind::Boolean) {
|
||||
desc.ui_min = 0.0f;
|
||||
desc.ui_max = 1.0f;
|
||||
desc.ui_step = 1.0f;
|
||||
} else if (desc.kind == FxUniformKind::Int) {
|
||||
} else if (desc.kind == FxUniformKind::Integer) {
|
||||
desc.ui_min = 0.0f;
|
||||
desc.ui_max = 100.0f;
|
||||
desc.ui_step = 1.0f;
|
||||
@@ -136,7 +136,7 @@ FxUniformDesc DescribeUniform(const reshadefx::uniform& info) {
|
||||
|
||||
if (desc.ui_step <= 0.0f) {
|
||||
desc.ui_step = 0.01f;
|
||||
if (desc.kind != FxUniformKind::Float) {
|
||||
if (desc.kind != FxUniformKind::Floating) {
|
||||
desc.ui_step = 1.0f;
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,7 @@ FxUniformDesc DescribeUniform(const reshadefx::uniform& info) {
|
||||
|
||||
if (info.has_initializer_value) {
|
||||
for (u32 i = 0; i < desc.components; ++i) {
|
||||
if (desc.kind == FxUniformKind::Float) {
|
||||
if (desc.kind == FxUniformKind::Floating) {
|
||||
desc.default_value[i] = info.initializer_value.as_float[i];
|
||||
} else {
|
||||
desc.default_value[i] = static_cast<f32>(info.initializer_value.as_int[i]);
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
namespace VideoCore {
|
||||
|
||||
enum class FxUniformKind {
|
||||
Bool,
|
||||
Int,
|
||||
Float,
|
||||
Boolean,
|
||||
Integer,
|
||||
Floating,
|
||||
};
|
||||
|
||||
enum class FxUiType {
|
||||
@@ -35,7 +35,7 @@ struct FxUniformDesc {
|
||||
std::string label;
|
||||
std::string tooltip;
|
||||
std::string category;
|
||||
FxUniformKind kind{FxUniformKind::Float};
|
||||
FxUniformKind kind{FxUniformKind::Floating};
|
||||
u32 components{1};
|
||||
FxUiType ui_type{FxUiType::Hidden};
|
||||
f32 ui_min{0.0f};
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "common/fs/fs.h"
|
||||
#include "common/fs/fs_util.h"
|
||||
#include "common/logging.h"
|
||||
#include "common/stb.h"
|
||||
#include "video_core/post_processing/fx_chain.h"
|
||||
#include "video_core/post_processing/fx_compile.h"
|
||||
#include "video_core/post_processing/fx_effect.h"
|
||||
|
||||
@@ -46,7 +46,7 @@ int SliderSteps(const VideoCore::FxUniformDesc& uniform) {
|
||||
}
|
||||
|
||||
QString FormatValue(const VideoCore::FxUniformDesc& uniform, float value) {
|
||||
if (uniform.kind == VideoCore::FxUniformKind::Float) {
|
||||
if (uniform.kind == VideoCore::FxUniformKind::Floating) {
|
||||
return QString::number(value, 'f', 3);
|
||||
}
|
||||
return QString::number(static_cast<int>(std::lround(value)));
|
||||
@@ -262,7 +262,7 @@ QWidget* ConfigurePostProcessing::BuildSlot(int index, const VideoCore::FxChainE
|
||||
PopulateEffectCombo(combo, entry);
|
||||
connect(combo, &QComboBox::currentIndexChanged, this, [this, index, combo](int) {
|
||||
const QString key = combo->currentData().toString();
|
||||
const int separator = key.indexOf(QLatin1Char('|'));
|
||||
const qsizetype separator = key.indexOf(QLatin1Char('|'));
|
||||
if (separator < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user