Skip to content

Commit

Permalink
Merge pull request #11658 from unknownbrackets/ui-minor
Browse files Browse the repository at this point in the history
Windows: Hide Vulkan/D3D11 if not available
  • Loading branch information
hrydgard authored Dec 11, 2018
2 parents 5ddb9ee + bb7d964 commit 60a81a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
5 changes: 4 additions & 1 deletion GPU/Debugger/Record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,10 @@ void DumpExecute::SyncStall() {
gpu->UpdateStall(execListID, execListPos);
s64 listTicks = gpu->GetListTicks(execListID);
if (listTicks != -1) {
currentMIPS->downcount -= listTicks - CoreTiming::GetTicks();
s64 nowTicks = CoreTiming::GetTicks();
if (listTicks > nowTicks) {
currentMIPS->downcount -= listTicks - nowTicks;
}
}

// Make sure downcount doesn't overflow.
Expand Down
17 changes: 11 additions & 6 deletions Windows/MainWindowMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "Common/Log.h"
#include "Common/LogManager.h"
#include "Common/ConsoleListener.h"
#include "Common/OSVersion.h"
#include "Common/Vulkan/VulkanLoader.h"
#include "GPU/GLES/TextureScalerGLES.h"
#include "GPU/GLES/TextureCacheGLES.h"
#include "UI/OnScreenDisplay.h"
Expand Down Expand Up @@ -1268,30 +1270,33 @@ namespace MainWindow {
CheckMenuItem(menu, savestateSlot[i], MF_BYCOMMAND | ((i == g_Config.iCurrentStateSlot) ? MF_CHECKED : MF_UNCHECKED));
}

bool allowD3D11 = DoesVersionMatchWindows(6, 0, 0, 0, true);
bool allowVulkan = VulkanMayBeAvailable();

switch (GetGPUBackend()) {
case GPUBackend::DIRECT3D9:
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_GRAYED);
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D11, allowD3D11 ? MF_ENABLED : MF_GRAYED);
EnableMenuItem(menu, ID_OPTIONS_OPENGL, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_VULKAN, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_VULKAN, allowVulkan ? MF_ENABLED : MF_GRAYED);
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_CHECKED);
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_UNCHECKED);
CheckMenuItem(menu, ID_OPTIONS_OPENGL, MF_UNCHECKED);
CheckMenuItem(menu, ID_OPTIONS_VULKAN, MF_UNCHECKED);
break;
case GPUBackend::OPENGL:
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D11, allowD3D11 ? MF_ENABLED : MF_GRAYED);
EnableMenuItem(menu, ID_OPTIONS_OPENGL, MF_GRAYED);
EnableMenuItem(menu, ID_OPTIONS_VULKAN, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_VULKAN, allowVulkan ? MF_ENABLED : MF_GRAYED);
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_UNCHECKED);
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_UNCHECKED);
CheckMenuItem(menu, ID_OPTIONS_OPENGL, MF_CHECKED);
CheckMenuItem(menu, ID_OPTIONS_VULKAN, MF_UNCHECKED);
break;
case GPUBackend::VULKAN:
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D11, allowD3D11 ? MF_ENABLED : MF_GRAYED);
EnableMenuItem(menu, ID_OPTIONS_OPENGL, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_VULKAN, MF_GRAYED);
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_UNCHECKED);
Expand All @@ -1303,7 +1308,7 @@ namespace MainWindow {
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_GRAYED);
EnableMenuItem(menu, ID_OPTIONS_OPENGL, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_VULKAN, MF_ENABLED);
EnableMenuItem(menu, ID_OPTIONS_VULKAN, allowVulkan ? MF_ENABLED : MF_GRAYED);
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_UNCHECKED);
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_CHECKED);
CheckMenuItem(menu, ID_OPTIONS_OPENGL, MF_UNCHECKED);
Expand Down

7 comments on commit 60a81a6

@tausifj15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New versions suck Really 1.7-1.7.5 only lags and crash

@hrydgard
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tausifj15 Instead of commenting on random commits, please file an issue detailing:

  • Your hardware
  • Which games are affected
  • For those that are slower, framerate on 1.6 vs 1.7

@tausifj15
Copy link

@tausifj15 tausifj15 commented on 60a81a6 Dec 12, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hrydgard
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want me to listen, please follow my instructions.

I told you to create a new issue. Go here: https://github.com/hrydgard/ppsspp/issues
and click New Issue, then copy your complaint in there.

@tausifj15
Copy link

@tausifj15 tausifj15 commented on 60a81a6 Dec 12, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ralfy12
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you fix if i pull issues?

On Wed, Dec 12, 2018, 5:43 PM Henrik Rydgård @.*** wrote: If you want me to listen, please follow my instructions. I told you to create a new issue. Go here: https://github.com/hrydgard/ppsspp/issues and click New Issue, then copy your complaint in there. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <60a81a6#commitcomment-31650385>, or mute the thread https://github.com/notifications/unsubscribe-auth/ATbKhnyYZA_sCkMPf0CK-cJJeZno_SUkks5u4PLvgaJpZM4ZO0bG .

Your phone is underpowered for PPSSPP, tausifj15. What kind of results are you expecting with a US$150 phone? Get a newer model.

All fine on my end with v1.7.4 and up, hrydgard. Huawei P20, no issues, entirely stable and everything runs smooth as melted butter. The best versions to date, your work is always appreciated! :)

@tausifj15
Copy link

@tausifj15 tausifj15 commented on 60a81a6 Dec 14, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.