libretro: fix texupscale and max upscaled texture size settings value
This commit is contained in:
parent
b91b3d5da6
commit
4fe8e40569
|
@ -418,8 +418,10 @@ extern Option<bool> RenderToTextureBuffer;
|
|||
extern Option<bool> TranslucentPolygonDepthMask;
|
||||
extern Option<bool> ModifierVolumes;
|
||||
constexpr bool Clipping = true;
|
||||
#ifndef LIBRETRO
|
||||
extern Option<int> TextureUpscale;
|
||||
extern Option<int> MaxFilteredTextureSize;
|
||||
#endif
|
||||
extern Option<float> ExtraDepthScale;
|
||||
extern Option<bool> CustomTextures;
|
||||
extern Option<bool> DumpTextures;
|
||||
|
|
|
@ -450,13 +450,13 @@ struct retro_core_option_v2_definition option_defs_us[] = {
|
|||
NULL,
|
||||
"video",
|
||||
{
|
||||
{ "off", "disabled" },
|
||||
{ "2x", NULL },
|
||||
{ "4x", NULL },
|
||||
{ "6x", NULL },
|
||||
{ "1", "disabled" },
|
||||
{ "2", "2x" },
|
||||
{ "4", "4x" },
|
||||
{ "6", "6x" },
|
||||
{ NULL, NULL },
|
||||
},
|
||||
"off",
|
||||
"1",
|
||||
},
|
||||
{/* TODO: needs clarification */
|
||||
CORE_OPTION_NAME "_texupscale_max_filtered_texture_size",
|
||||
|
|
|
@ -60,8 +60,8 @@ Option<bool> ShowFPS("");
|
|||
Option<bool> RenderToTextureBuffer(CORE_OPTION_NAME "_enable_rttb");
|
||||
Option<bool> TranslucentPolygonDepthMask("");
|
||||
Option<bool> ModifierVolumes(CORE_OPTION_NAME "_volume_modifier_enable", true);
|
||||
Option<int> TextureUpscale(CORE_OPTION_NAME "_texupscale", 1);
|
||||
Option<int> MaxFilteredTextureSize(CORE_OPTION_NAME "_texupscale_max_filtered_texture_size", 256);
|
||||
IntOption TextureUpscale(CORE_OPTION_NAME "_texupscale", 1);
|
||||
IntOption MaxFilteredTextureSize(CORE_OPTION_NAME "_texupscale_max_filtered_texture_size", 256);
|
||||
Option<float> ExtraDepthScale("", 1.f);
|
||||
Option<bool> CustomTextures(CORE_OPTION_NAME "_custom_textures");
|
||||
Option<bool> DumpTextures(CORE_OPTION_NAME "_dump_textures");
|
||||
|
|
|
@ -61,6 +61,7 @@ private:
|
|||
|
||||
template<typename T, bool>
|
||||
friend class Option;
|
||||
friend class IntOption;
|
||||
};
|
||||
|
||||
// Missing in C++11
|
||||
|
@ -182,4 +183,21 @@ protected:
|
|||
Settings& settings;
|
||||
};
|
||||
|
||||
// Uses the setting value converted to int instead of the value index
|
||||
class IntOption : public Option<int> {
|
||||
public:
|
||||
IntOption(const std::string& name, int defaultValue = 0)
|
||||
: Option<int>(name, defaultValue)
|
||||
{
|
||||
}
|
||||
|
||||
void load() override {
|
||||
retro_variable var { name.c_str() };
|
||||
if (settings.retroEnv(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value != nullptr)
|
||||
set(atoi(var.value));
|
||||
}
|
||||
};
|
||||
|
||||
extern Option<bool> PowerVR2Filter;
|
||||
extern IntOption TextureUpscale;
|
||||
extern IntOption MaxFilteredTextureSize;
|
||||
|
|
Loading…
Reference in New Issue