mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 21:21:57 -04:00
Merge remote-tracking branch 'origin/main' into presets
# Conflicts: # files.cmake # src/d/actor/d_a_title.cpp # src/dusk/config.cpp # src/dusk/imgui/ImGuiConsole.cpp # src/dusk/imgui/ImGuiEngine.cpp
This commit is contained in:
@@ -111,13 +111,6 @@ void Save();
|
||||
*/
|
||||
ConfigVarBase* GetConfigVar(std::string_view name);
|
||||
|
||||
/**
|
||||
* \brief Returns true if no config file was found on the last LoadFromUserPreferences() call.
|
||||
*
|
||||
* For detect first run to prompt the user to choose a preset.
|
||||
*/
|
||||
bool IsConfigFileMissing();
|
||||
|
||||
template <ConfigValue T>
|
||||
const ConfigImplBase* GetConfigImpl() {
|
||||
static ConfigImpl<T> config;
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
* @param arg Arguments to forward to construct the default value.
|
||||
*/
|
||||
template <typename... Args>
|
||||
explicit ConfigVar(const char* name, Args&&... arg)
|
||||
ConfigVar(const char* name, Args&&... arg)
|
||||
: ConfigVarBase(name, GetConfigImpl<T>()), defaultValue(std::forward<Args>(arg)...),
|
||||
value(), overrideValue() {}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef DUSK_FRAME_INTERP_H
|
||||
#define DUSK_FRAME_INTERP_H
|
||||
|
||||
#include <dolphin/mtx.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace dusk {
|
||||
namespace frame_interp {
|
||||
|
||||
void ensure_initialized();
|
||||
|
||||
void begin_record();
|
||||
void end_record();
|
||||
void interpolate(float step);
|
||||
void notify_sim_tick_complete();
|
||||
uint32_t begin_presentation_ui_pass();
|
||||
uint32_t get_presentation_ui_advance_ticks();
|
||||
void end_presentation_ui_pass();
|
||||
|
||||
void open_child(const void* key, int32_t id);
|
||||
void close_child();
|
||||
void record_final_mtx_raw(const Mtx* dest, const Mtx src);
|
||||
|
||||
bool lookup_replacement(const void* source, Mtx out);
|
||||
bool lookup_concat_replacement(const void* lhs, const void* rhs, Mtx out);
|
||||
|
||||
} // namespace frame_interp
|
||||
} // namespace dusk
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <dolphin/gx/GXAurora.h>
|
||||
#include <dolphin/gx/GXExtra.h>
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#define GX_DEBUG_GROUP(name, ...) \
|
||||
do { \
|
||||
@@ -51,4 +52,6 @@ struct GXScopedDebugGroup {
|
||||
}
|
||||
};
|
||||
|
||||
#define GX_AND_TRACY_SCOPED(name) GXScopedDebugGroup scope(name); ZoneScopedN(name);
|
||||
|
||||
#endif // DUSK_GX_HELPER_H
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
#define DUSK_MAIN_H
|
||||
|
||||
namespace dusk {
|
||||
extern bool IsRunning;
|
||||
extern bool IsShuttingDown;
|
||||
extern bool IsGameLaunched;
|
||||
}
|
||||
|
||||
#endif // DUSK_MAIN_H
|
||||
|
||||
@@ -53,6 +53,7 @@ struct UserSettings {
|
||||
// Graphics
|
||||
ConfigVar<bool> enableBloom;
|
||||
ConfigVar<bool> useWaterProjectionOffset;
|
||||
ConfigVar<bool> enableFrameInterpolation;
|
||||
|
||||
// Audio
|
||||
ConfigVar<bool> noLowHpSound;
|
||||
@@ -70,6 +71,14 @@ struct UserSettings {
|
||||
// Controls
|
||||
ConfigVar<bool> enableTurboKeybind;
|
||||
} game;
|
||||
|
||||
struct {
|
||||
ConfigVar<std::string> isoPath;
|
||||
ConfigVar<std::string> graphicsBackend;
|
||||
ConfigVar<bool> skipPreLaunchUI;
|
||||
ConfigVar<bool> showPipelineCompilation;
|
||||
ConfigVar<bool> wasPresetChosen;
|
||||
} backend;
|
||||
};
|
||||
|
||||
UserSettings& getSettings();
|
||||
|
||||
+6
-1
@@ -14,6 +14,7 @@
|
||||
#endif
|
||||
#include <Windows.h>
|
||||
#include <shellapi.h>
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
#include "dusk/logging.h"
|
||||
@@ -92,7 +93,11 @@ private:
|
||||
}
|
||||
do {
|
||||
QueryPerformanceCounter(¤t);
|
||||
_mm_pause(); // Yield CPU
|
||||
#if defined(_M_ARM64) || defined(_M_ARM)
|
||||
__yield();
|
||||
#else
|
||||
_mm_pause();
|
||||
#endif
|
||||
} while (current.QuadPart - start.QuadPart < ticksToWait);
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user