mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-12 17:58:29 +12:00
Add all the files
This commit is contained in:
parent
e3db07a16a
commit
d60742f52b
1445 changed files with 430238 additions and 0 deletions
68
src/Cafe/GameProfile/GameProfile.h
Normal file
68
src/Cafe/GameProfile/GameProfile.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include "config/CemuConfig.h"
|
||||
|
||||
struct gameProfileIntegerOption_t
|
||||
{
|
||||
bool isPresent = false;
|
||||
sint32 value;
|
||||
};
|
||||
|
||||
class GameProfile
|
||||
{
|
||||
friend class GameProfileWindow;
|
||||
|
||||
public:
|
||||
static const uint32 kThreadQuantumDefault = 45000;
|
||||
|
||||
bool Load(uint64_t title_id, bool notifyCemuhook);
|
||||
void Save(uint64_t title_id);
|
||||
void ResetOptional();
|
||||
void Reset();
|
||||
|
||||
[[nodiscard]] uint64 GetTitleId() const { return m_title_id; }
|
||||
[[nodiscard]] bool IsLoaded() const { return m_is_loaded; }
|
||||
[[nodiscard]] bool IsDefaultProfile() const { return m_is_default; }
|
||||
[[nodiscard]] const std::optional<std::string>& GetGameName() const { return m_gameName; }
|
||||
|
||||
[[nodiscard]] const std::optional<bool>& ShouldLoadSharedLibraries() const { return m_loadSharedLibraries; }
|
||||
[[nodiscard]] bool StartWithGamepadView() const { return m_startWithPadView; }
|
||||
|
||||
[[nodiscard]] const std::optional<GraphicAPI>& GetGraphicsAPI() const { return m_graphics_api; }
|
||||
[[nodiscard]] const AccurateShaderMulOption& GetAccurateShaderMul() const { return m_accurateShaderMul; }
|
||||
[[nodiscard]] const std::optional<PrecompiledShaderOption>& GetPrecompiledShadersState() const { return m_precompiledShaders; }
|
||||
|
||||
[[nodiscard]] uint32 GetThreadQuantum() const { return m_threadQuantum; }
|
||||
[[nodiscard]] const std::optional<CPUMode>& GetCPUMode() const { return m_cpuMode; }
|
||||
|
||||
[[nodiscard]] bool IsAudioDisabled() const { return m_disableAudio; }
|
||||
|
||||
[[nodiscard]] const std::array< std::optional<std::string>, 8>& GetControllerProfile() const { return m_controllerProfile; }
|
||||
|
||||
private:
|
||||
uint64_t m_title_id = 0;
|
||||
bool m_is_loaded = false;
|
||||
bool m_is_default = true;
|
||||
|
||||
std::optional<std::string> m_gameName{};
|
||||
|
||||
// general settings
|
||||
std::optional<bool> m_loadSharedLibraries{}; // = true;
|
||||
bool m_startWithPadView = false;
|
||||
|
||||
// graphic settings
|
||||
std::optional<GraphicAPI> m_graphics_api{};
|
||||
AccurateShaderMulOption m_accurateShaderMul = AccurateShaderMulOption::True;
|
||||
std::optional<PrecompiledShaderOption> m_precompiledShaders{};
|
||||
// cpu settings
|
||||
uint32 m_threadQuantum = kThreadQuantumDefault; // values: 20000 45000 60000 80000 100000
|
||||
std::optional<CPUMode> m_cpuMode{}; // = CPUModeOption::kSingleCoreRecompiler;
|
||||
// audio
|
||||
bool m_disableAudio = false;
|
||||
// controller settings
|
||||
std::array< std::optional<std::string>, 8> m_controllerProfile{};
|
||||
};
|
||||
extern std::unique_ptr<GameProfile> g_current_game_profile;
|
||||
|
||||
__declspec(dllexport) void gameProfile_load();
|
Loading…
Add table
Add a link
Reference in a new issue