UI: Ask for restart when changing graphics device.

Only for D3D11 and Vulkan.

Also, makes Vulkan follow D3D11 in not changing the setting if the device
is not found on startup.
This commit is contained in:
Unknown W. Brackets
2018-09-30 00:53:21 -07:00
parent f90439a70e
commit 7ee4d2d5a1
6 changed files with 60 additions and 15 deletions
+7 -1
View File
@@ -97,6 +97,7 @@ volatile bool coreStatePending = false;
static volatile CPUThreadState cpuThreadState = CPU_THREAD_NOT_RUNNING;
static GPUBackend gpuBackend;
static std::string gpuBackendDevice;
void ResetUIState() {
globalUIState = UISTATE_MENU;
@@ -124,14 +125,19 @@ GlobalUIState GetUIState() {
return globalUIState;
}
void SetGPUBackend(GPUBackend type) {
void SetGPUBackend(GPUBackend type, const std::string &device) {
gpuBackend = type;
gpuBackendDevice = device;
}
GPUBackend GetGPUBackend() {
return gpuBackend;
}
std::string GetGPUBackendDevice() {
return gpuBackendDevice;
}
bool IsAudioInitialised() {
return audioInitialized;
}