mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-19 09:54:54 +00:00
config: option to select gpu for vk device
This commit is contained in:
parent
249373bf0d
commit
453b24eb20
3 changed files with 12 additions and 3 deletions
|
@ -12,6 +12,7 @@ namespace Config {
|
|||
bool isNeo = false;
|
||||
u32 screenWidth = 1280;
|
||||
u32 screenHeight = 720;
|
||||
u32 gpuId = 0; // Vulkan physical device no
|
||||
std::string logFilter;
|
||||
std::string logType = "sync";
|
||||
bool isDebugDump = false;
|
||||
|
@ -32,6 +33,10 @@ u32 getScreenHeight() {
|
|||
return screenHeight;
|
||||
}
|
||||
|
||||
u32 getGpuId() {
|
||||
return gpuId;
|
||||
}
|
||||
|
||||
std::string getLogFilter() {
|
||||
return logFilter;
|
||||
}
|
||||
|
@ -76,8 +81,9 @@ void load(const std::filesystem::path& path) {
|
|||
if (generalResult.is_ok()) {
|
||||
auto general = generalResult.unwrap();
|
||||
|
||||
screenWidth = toml::find_or<toml::integer>(general, "screenWidth", false);
|
||||
screenHeight = toml::find_or<toml::integer>(general, "screenHeight", false);
|
||||
screenWidth = toml::find_or<toml::integer>(general, "screenWidth", screenWidth);
|
||||
screenHeight = toml::find_or<toml::integer>(general, "screenHeight", screenHeight);
|
||||
gpuId = toml::find_or<toml::integer>(general, "gpuId", 0);
|
||||
}
|
||||
}
|
||||
if (data.contains("Debug")) {
|
||||
|
@ -119,6 +125,7 @@ void save(const std::filesystem::path& path) {
|
|||
data["General"]["isPS4Pro"] = isNeo;
|
||||
data["General"]["logFilter"] = logFilter;
|
||||
data["General"]["logType"] = logType;
|
||||
data["GPU"]["gpuId"] = gpuId;
|
||||
data["GPU"]["screenWidth"] = screenWidth;
|
||||
data["GPU"]["screenHeight"] = screenHeight;
|
||||
data["Debug"]["DebugDump"] = isDebugDump;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue