2024-01-01 06:09:14 +01:00
|
|
|
#ifndef __CONFIG_HPP__
|
|
|
|
#define __CONFIG_HPP__
|
|
|
|
|
|
|
|
#include "common/rt64_user_configuration.h"
|
|
|
|
|
|
|
|
namespace ultramodern {
|
|
|
|
enum class Resolution {
|
|
|
|
Original,
|
|
|
|
Original2x,
|
|
|
|
Auto,
|
|
|
|
OptionCount
|
|
|
|
};
|
|
|
|
enum class WindowMode {
|
|
|
|
Windowed,
|
|
|
|
Fullscreen,
|
|
|
|
OptionCount
|
|
|
|
};
|
2024-04-01 16:31:36 +02:00
|
|
|
enum class HUDRatioMode {
|
|
|
|
Original,
|
|
|
|
Clamp16x9,
|
|
|
|
Full,
|
|
|
|
OptionCount
|
|
|
|
};
|
2024-04-14 22:57:11 +02:00
|
|
|
enum class GraphicsApi {
|
|
|
|
Auto,
|
|
|
|
D3D12,
|
|
|
|
Vulkan,
|
|
|
|
OptionCount
|
|
|
|
};
|
2024-01-01 06:09:14 +01:00
|
|
|
|
|
|
|
struct GraphicsConfig {
|
|
|
|
Resolution res_option;
|
|
|
|
WindowMode wm_option;
|
2024-04-01 16:31:36 +02:00
|
|
|
HUDRatioMode hr_option;
|
2024-04-14 22:57:11 +02:00
|
|
|
GraphicsApi api_option;
|
2024-01-01 06:09:14 +01:00
|
|
|
RT64::UserConfiguration::AspectRatio ar_option;
|
|
|
|
RT64::UserConfiguration::Antialiasing msaa_option;
|
|
|
|
RT64::UserConfiguration::RefreshRate rr_option;
|
|
|
|
int rr_manual_value;
|
2024-03-27 23:43:15 +01:00
|
|
|
int ds_option;
|
2024-03-03 05:23:29 +01:00
|
|
|
bool developer_mode;
|
2024-01-01 06:09:14 +01:00
|
|
|
|
|
|
|
auto operator<=>(const GraphicsConfig& rhs) const = default;
|
|
|
|
};
|
|
|
|
|
2024-01-21 20:04:56 +01:00
|
|
|
void set_graphics_config(const GraphicsConfig& config);
|
2024-01-22 01:21:58 +01:00
|
|
|
GraphicsConfig get_graphics_config();
|
|
|
|
|
|
|
|
NLOHMANN_JSON_SERIALIZE_ENUM(ultramodern::Resolution, {
|
|
|
|
{ultramodern::Resolution::Original, "Original"},
|
|
|
|
{ultramodern::Resolution::Original2x, "Original2x"},
|
|
|
|
{ultramodern::Resolution::Auto, "Auto"},
|
|
|
|
});
|
|
|
|
|
|
|
|
NLOHMANN_JSON_SERIALIZE_ENUM(ultramodern::WindowMode, {
|
|
|
|
{ultramodern::WindowMode::Windowed, "Windowed"},
|
|
|
|
{ultramodern::WindowMode::Fullscreen, "Fullscreen"}
|
|
|
|
});
|
2024-04-01 16:31:36 +02:00
|
|
|
|
|
|
|
NLOHMANN_JSON_SERIALIZE_ENUM(ultramodern::HUDRatioMode, {
|
|
|
|
{ultramodern::HUDRatioMode::Original, "Original"},
|
|
|
|
{ultramodern::HUDRatioMode::Clamp16x9, "Clamp16x9"},
|
|
|
|
{ultramodern::HUDRatioMode::Full, "Full"},
|
|
|
|
});
|
2024-04-14 22:57:11 +02:00
|
|
|
|
|
|
|
NLOHMANN_JSON_SERIALIZE_ENUM(ultramodern::GraphicsApi, {
|
|
|
|
{ultramodern::GraphicsApi::Auto, "Auto"},
|
|
|
|
{ultramodern::GraphicsApi::D3D12, "D3D12"},
|
|
|
|
{ultramodern::GraphicsApi::Vulkan, "Vulkan"},
|
|
|
|
});
|
2024-01-01 06:09:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|