summaryrefslogtreecommitdiff
path: root/src/port/ui/ImguiUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/ui/ImguiUI.cpp')
-rw-r--r--src/port/ui/ImguiUI.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp
index f73353f0..442738fe 100644
--- a/src/port/ui/ImguiUI.cpp
+++ b/src/port/ui/ImguiUI.cpp
@@ -111,16 +111,15 @@ void DrawSettingsMenu(){
// })) {
// audio_set_player_volume(SEQ_PLAYER_ENV, CVarGetFloat("gEnvironmentVolume", 1.0f));
// }
- //
+
// static std::unordered_map<Ship::AudioBackend, const char*> audioBackendNames = {
// { Ship::AudioBackend::WASAPI, "Windows Audio Session API" },
- // { Ship::AudioBackend::PULSE, "PulseAudio" },
// { Ship::AudioBackend::SDL, "SDL" },
// };
- //
+
// ImGui::Text("Audio API (Needs reload)");
// auto currentAudioBackend = Ship::Context::GetInstance()->GetAudio()->GetAudioBackend();
- //
+
// if (Ship::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size() <= 1) {
// UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
// }
@@ -136,7 +135,7 @@ void DrawSettingsMenu(){
// if (Ship::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size() <= 1) {
// UIWidgets::ReEnableComponent("");
// }
- //
+
// ImGui::EndMenu();
// }
@@ -188,7 +187,7 @@ void DrawSettingsMenu(){
{ // FPS Slider
const int minFps = 30;
static int maxFps;
- if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
+ if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::FAST3D_DXGI_DX11) {
maxFps = 360;
} else {
maxFps = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
@@ -256,12 +255,12 @@ void DrawSettingsMenu(){
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
#else
bool matchingRefreshRate =
- CVarGetInteger("gMatchRefreshRate", 0) && Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() != Ship::WindowBackend::DX11;
+ CVarGetInteger("gMatchRefreshRate", 0) && Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() != Ship::WindowBackend::FAST3D_DXGI_DX11;
UIWidgets::CVarSliderInt((currentFps == 20) ? "FPS: Original (20)" : "FPS: %d", "gInterpolationFPS", minFps, maxFps, 1, {
.disabled = matchingRefreshRate
});
#endif
- if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
+ if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::FAST3D_DXGI_DX11) {
UIWidgets::Tooltip(
"Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. This is purely "
"visual and does not impact game logic, execution of glitches etc.\n\n"
@@ -275,7 +274,7 @@ void DrawSettingsMenu(){
}
} // END FPS Slider
- if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
+ if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::FAST3D_DXGI_DX11) {
UIWidgets::Spacer(0);
if (ImGui::Button("Match Refresh Rate")) {
int hz = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
@@ -290,7 +289,7 @@ void DrawSettingsMenu(){
UIWidgets::Tooltip("Matches interpolation value to the current game's window refresh rate");
- if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
+ if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::FAST3D_DXGI_DX11) {
UIWidgets::PaddedEnhancementSliderInt(CVarGetInteger("gExtraLatencyThreshold", 80) == 0 ? "Jitter fix: Off" : "Jitter fix: >= %d FPS",
"##ExtraLatencyThreshold", "gExtraLatencyThreshold", 0, 360, "", 80, true, true, false);
UIWidgets::Tooltip("When Interpolation FPS setting is at least this threshold, add one frame of input lag (e.g. 16.6 ms for 60 FPS) in order to avoid jitter. This setting allows the CPU to work on one frame while GPU works on the previous frame.\nThis setting should be used when your computer is too slow to do CPU + GPU work in time.");
@@ -300,17 +299,16 @@ void DrawSettingsMenu(){
static std::unordered_map<Ship::WindowBackend, const char*> windowBackendNames = {
- { Ship::WindowBackend::DX11, "DirectX" },
- { Ship::WindowBackend::SDL_OPENGL, "OpenGL"},
- { Ship::WindowBackend::SDL_METAL, "Metal" },
- { Ship::WindowBackend::GX2, "GX2"}
+ { Ship::WindowBackend::FAST3D_DXGI_DX11, "DirectX" },
+ { Ship::WindowBackend::FAST3D_SDL_OPENGL, "OpenGL"},
+ { Ship::WindowBackend::FAST3D_SDL_METAL, "Metal" }
};
ImGui::Text("Renderer API (Needs reload)");
Ship::WindowBackend runningWindowBackend = Ship::Context::GetInstance()->GetWindow()->GetWindowBackend();
Ship::WindowBackend configWindowBackend;
int configWindowBackendId = Ship::Context::GetInstance()->GetConfig()->GetInt("Window.Backend.Id", -1);
- if (configWindowBackendId != -1 && configWindowBackendId < static_cast<int>(Ship::WindowBackend::BACKEND_COUNT)) {
+ if (configWindowBackendId != -1 && configWindowBackendId < static_cast<int>(Ship::WindowBackend::WINDOW_BACKEND_COUNT)) {
configWindowBackend = static_cast<Ship::WindowBackend>(configWindowBackendId);
} else {
configWindowBackend = runningWindowBackend;
@@ -364,7 +362,7 @@ void DrawSettingsMenu(){
void DrawMenuBarIcon() {
static bool gameIconLoaded = false;
if (!gameIconLoaded) {
- // Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTexture("Game_Icon", "textures/icons/gIcon.png");
+ // Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture("Game_Icon", "textures/icons/gIcon.png", ImVec4(1.0f, 1.0f, 1.0f, 1.0f));
gameIconLoaded = false;
}