mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-07 06:00:30 +00:00
Disable features not available on Windows ARM32/ARM64
ARM32: OpenGL & DirectInput ARM64: OpenGL
This commit is contained in:
parent
04744f28d6
commit
0aa33d53c0
@ -566,7 +566,7 @@ int Config::NextValidBackend() {
|
||||
return (int)GPUBackend::DIRECT3D11;
|
||||
}
|
||||
#endif
|
||||
#if !PPSSPP_PLATFORM(UWP)
|
||||
#if !PPSSPP_PLATFORM(UWP) && !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
if (!failed.count((int)GPUBackend::OPENGL)) {
|
||||
return (int)GPUBackend::OPENGL;
|
||||
}
|
||||
|
@ -27,8 +27,9 @@
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
#include "GPU/D3D11/GPU_D3D11.h"
|
||||
#else
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
#include "GPU/GLES/GPU_GLES.h"
|
||||
|
||||
#endif
|
||||
#include "GPU/Vulkan/GPU_Vulkan.h"
|
||||
#include "GPU/Null/NullGpu.h"
|
||||
#include "GPU/Software/SoftGpu.h"
|
||||
@ -71,8 +72,12 @@ bool GPU_Init(GraphicsContext *ctx, Draw::DrawContext *draw) {
|
||||
SetGPU(new NullGPU());
|
||||
break;
|
||||
case GPUCORE_GLES:
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
SetGPU(new GPU_GLES(ctx, draw));
|
||||
break;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
case GPUCORE_SOFTWARE:
|
||||
SetGPU(new SoftGPU(ctx, draw));
|
||||
break;
|
||||
|
@ -219,9 +219,11 @@ void EmuScreen::bootGame(const std::string &filename) {
|
||||
coreParam.gpuCore = GPUCORE_DIRECTX11;
|
||||
break;
|
||||
#if !PPSSPP_PLATFORM(UWP)
|
||||
#if !defined(_M_ARM) && !defined(_M_ARM64)
|
||||
case GPUBackend::OPENGL:
|
||||
coreParam.gpuCore = GPUCORE_GLES;
|
||||
break;
|
||||
#endif
|
||||
case GPUBackend::DIRECT3D9:
|
||||
coreParam.gpuCore = GPUCORE_DIRECTX9;
|
||||
break;
|
||||
|
@ -203,6 +203,9 @@ void GameSettingsScreen::CreateViews() {
|
||||
renderingBackendChoice->HideChoice(1); // D3D9
|
||||
renderingBackendChoice->HideChoice(2); // D3D11
|
||||
#else
|
||||
#if defined(_M_ARM) || defined(_M_ARM64)
|
||||
renderingBackendChoice->HideChoice(0); // OpenGL
|
||||
#endif
|
||||
if (!DoesVersionMatchWindows(6, 0, 0, 0, true)) {
|
||||
// Hide the D3D11 choice if Windows version is older than Windows Vista.
|
||||
renderingBackendChoice->HideChoice(2); // D3D11
|
||||
|
@ -48,13 +48,19 @@
|
||||
#include "Core/MIPS/JitCommon/JitBlockCache.h"
|
||||
#include "Windows/InputBox.h"
|
||||
#include "Windows/InputDevice.h"
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
#include "Windows/GPU/WindowsGLContext.h"
|
||||
#include "Windows/GEDebugger/GEDebugger.h"
|
||||
#endif
|
||||
#include "Windows/Debugger/Debugger_Disasm.h"
|
||||
#include "Windows/Debugger/Debugger_MemoryDlg.h"
|
||||
#include "Windows/GEDebugger/GEDebugger.h"
|
||||
|
||||
#include "Common/GraphicsContext.h"
|
||||
|
||||
#include "Windows/main.h"
|
||||
#ifndef _M_ARM
|
||||
#include "Windows/DinputDevice.h"
|
||||
#endif
|
||||
#include "Windows/EmuThread.h"
|
||||
#include "Windows/resource.h"
|
||||
|
||||
@ -513,9 +519,10 @@ namespace MainWindow
|
||||
DialogManager::AddDlg(disasmWindow[0]);
|
||||
disasmWindow[0]->Show(g_Config.bShowDebuggerOnLoad);
|
||||
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
geDebuggerWindow = new CGEDebugger(MainWindow::GetHInstance(), MainWindow::GetHWND());
|
||||
DialogManager::AddDlg(geDebuggerWindow);
|
||||
|
||||
#endif
|
||||
memoryWindow[0] = new CMemoryDlg(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
|
||||
DialogManager::AddDlg(memoryWindow[0]);
|
||||
}
|
||||
@ -526,11 +533,13 @@ namespace MainWindow
|
||||
delete disasmWindow[0];
|
||||
disasmWindow[0] = 0;
|
||||
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
DialogManager::RemoveDlg(geDebuggerWindow);
|
||||
if (geDebuggerWindow)
|
||||
delete geDebuggerWindow;
|
||||
geDebuggerWindow = 0;
|
||||
|
||||
#endif
|
||||
|
||||
DialogManager::RemoveDlg(memoryWindow[0]);
|
||||
if (memoryWindow[0])
|
||||
delete memoryWindow[0];
|
||||
@ -816,7 +825,9 @@ namespace MainWindow
|
||||
return WindowsRawInput::ProcessChar(hWnd, wParam, lParam);
|
||||
|
||||
case WM_DEVICECHANGE:
|
||||
#ifndef _M_ARM
|
||||
DinputDevice::CheckDevices();
|
||||
#endif
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
|
||||
case WM_VERYSLEEPY_MSG:
|
||||
|
@ -16,11 +16,17 @@
|
||||
#include "Common/ConsoleListener.h"
|
||||
#include "Common/OSVersion.h"
|
||||
#include "Common/Vulkan/VulkanLoader.h"
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
#include "GPU/GLES/TextureScalerGLES.h"
|
||||
#include "GPU/GLES/TextureCacheGLES.h"
|
||||
#include "GPU/GLES/FramebufferManagerGLES.h"
|
||||
#endif
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
#include "GPU/Common/PostShader.h"
|
||||
#include "GPU/GLES/FramebufferManagerGLES.h"
|
||||
#include "GPU/Common/FramebufferCommon.h"
|
||||
#include "GPU/Common/TextureCacheCommon.h"
|
||||
#include "GPU/Common/TextureScalerCommon.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/ConfigValues.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
@ -881,8 +887,10 @@ namespace MainWindow {
|
||||
break;
|
||||
|
||||
case ID_DEBUG_GEDEBUGGER:
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
if (geDebuggerWindow)
|
||||
geDebuggerWindow->Show(true);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case ID_DEBUG_MEMORYVIEW:
|
||||
@ -1165,10 +1173,14 @@ namespace MainWindow {
|
||||
CheckMenuItem(menu, texscalingitems[i], MF_BYCOMMAND | ((i == g_Config.iTexScalingLevel) ? MF_CHECKED : MF_UNCHECKED));
|
||||
}
|
||||
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
if (g_Config.iGPUBackend == (int)GPUBackend::OPENGL && !gl_extensions.OES_texture_npot) {
|
||||
EnableMenuItem(menu, ID_TEXTURESCALING_3X, MF_GRAYED);
|
||||
EnableMenuItem(menu, ID_TEXTURESCALING_5X, MF_GRAYED);
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
EnableMenuItem(menu, ID_TEXTURESCALING_3X, MF_ENABLED);
|
||||
EnableMenuItem(menu, ID_TEXTURESCALING_5X, MF_ENABLED);
|
||||
}
|
||||
@ -1279,11 +1291,16 @@ namespace MainWindow {
|
||||
bool allowD3D11 = DoesVersionMatchWindows(6, 0, 0, 0, true);
|
||||
bool allowVulkan = VulkanMayBeAvailable();
|
||||
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
bool allowOpenGL = true;
|
||||
#else
|
||||
bool allowOpenGL = false;
|
||||
#endif
|
||||
switch (GetGPUBackend()) {
|
||||
case GPUBackend::DIRECT3D9:
|
||||
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_GRAYED);
|
||||
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D11, allowD3D11 ? MF_ENABLED : MF_GRAYED);
|
||||
EnableMenuItem(menu, ID_OPTIONS_OPENGL, MF_ENABLED);
|
||||
EnableMenuItem(menu, ID_OPTIONS_OPENGL, allowOpenGL ? MF_ENABLED : MF_GRAYED);
|
||||
EnableMenuItem(menu, ID_OPTIONS_VULKAN, allowVulkan ? MF_ENABLED : MF_GRAYED);
|
||||
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_CHECKED);
|
||||
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_UNCHECKED);
|
||||
@ -1303,7 +1320,7 @@ namespace MainWindow {
|
||||
case GPUBackend::VULKAN:
|
||||
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_ENABLED);
|
||||
EnableMenuItem(menu, ID_OPTIONS_DIRECT3D11, allowD3D11 ? MF_ENABLED : MF_GRAYED);
|
||||
EnableMenuItem(menu, ID_OPTIONS_OPENGL, MF_ENABLED);
|
||||
EnableMenuItem(menu, ID_OPTIONS_OPENGL, allowOpenGL ? MF_ENABLED : MF_GRAYED);
|
||||
EnableMenuItem(menu, ID_OPTIONS_VULKAN, MF_GRAYED);
|
||||
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_UNCHECKED);
|
||||
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_UNCHECKED);
|
||||
@ -1313,7 +1330,7 @@ namespace MainWindow {
|
||||
case GPUBackend::DIRECT3D11:
|
||||
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_OPENGL, allowOpenGL ? MF_ENABLED : MF_GRAYED);
|
||||
EnableMenuItem(menu, ID_OPTIONS_VULKAN, allowVulkan ? MF_ENABLED : MF_GRAYED);
|
||||
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D9, MF_UNCHECKED);
|
||||
CheckMenuItem(menu, ID_OPTIONS_DIRECT3D11, MF_CHECKED);
|
||||
@ -1322,6 +1339,10 @@ namespace MainWindow {
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(_M_ARM64) || defined(_M_ARM)
|
||||
EnableMenuItem(menu, ID_DEBUG_GEDEBUGGER, MF_GRAYED);
|
||||
#endif
|
||||
|
||||
UpdateDynamicMenuCheckmarks(menu);
|
||||
UpdateCommands();
|
||||
}
|
||||
|
@ -51,7 +51,9 @@
|
||||
#include "Windows/WindowsHost.h"
|
||||
#include "Windows/MainWindow.h"
|
||||
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
#include "Windows/GPU/WindowsGLContext.h"
|
||||
#endif
|
||||
#include "Windows/GPU/WindowsVulkanContext.h"
|
||||
#include "Windows/GPU/D3D9Context.h"
|
||||
#include "Windows/GPU/D3D11Context.h"
|
||||
@ -60,7 +62,9 @@
|
||||
#include "Windows/Debugger/Debugger_Disasm.h"
|
||||
#include "Windows/Debugger/Debugger_MemoryDlg.h"
|
||||
|
||||
#ifndef _M_ARM
|
||||
#include "Windows/DinputDevice.h"
|
||||
#endif
|
||||
#include "Windows/XinputDevice.h"
|
||||
#include "Windows/KeyboardDevice.h"
|
||||
|
||||
@ -86,11 +90,13 @@ WindowsHost::WindowsHost(HINSTANCE hInstance, HWND mainWindow, HWND displayWindo
|
||||
|
||||
//add first XInput device to respond
|
||||
input.push_back(std::shared_ptr<InputDevice>(new XinputDevice()));
|
||||
#ifndef _M_ARM
|
||||
//find all connected DInput devices of class GamePad
|
||||
numDinputDevices_ = DinputDevice::getNumPads();
|
||||
for (size_t i = 0; i < numDinputDevices_; i++) {
|
||||
input.push_back(std::shared_ptr<InputDevice>(new DinputDevice(static_cast<int>(i))));
|
||||
}
|
||||
#endif
|
||||
keyboard = std::shared_ptr<KeyboardDevice>(new KeyboardDevice());
|
||||
input.push_back(keyboard);
|
||||
|
||||
@ -115,9 +121,11 @@ void WindowsHost::UpdateConsolePosition() {
|
||||
bool WindowsHost::InitGraphics(std::string *error_message, GraphicsContext **ctx) {
|
||||
WindowsGraphicsContext *graphicsContext = nullptr;
|
||||
switch (g_Config.iGPUBackend) {
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
case (int)GPUBackend::OPENGL:
|
||||
graphicsContext = new WindowsGLContext();
|
||||
break;
|
||||
#endif
|
||||
case (int)GPUBackend::DIRECT3D9:
|
||||
graphicsContext = new D3D9Context();
|
||||
break;
|
||||
@ -208,6 +216,7 @@ void WindowsHost::PollControllers() {
|
||||
static int checkCounter = 0;
|
||||
static const int CHECK_FREQUENCY = 71;
|
||||
if (checkCounter++ > CHECK_FREQUENCY) {
|
||||
#ifndef _M_ARM
|
||||
size_t newCount = DinputDevice::getNumPads();
|
||||
if (newCount > numDinputDevices_) {
|
||||
INFO_LOG(SYSTEM, "New controller device detected");
|
||||
@ -216,7 +225,7 @@ void WindowsHost::PollControllers() {
|
||||
}
|
||||
numDinputDevices_ = newCount;
|
||||
}
|
||||
|
||||
#endif
|
||||
checkCounter = 0;
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,9 @@
|
||||
#include "Windows/Debugger/Debugger_Disasm.h"
|
||||
#include "Windows/Debugger/Debugger_MemoryDlg.h"
|
||||
#include "Windows/Debugger/Debugger_VFPUDlg.h"
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
#include "Windows/GEDebugger/GEDebugger.h"
|
||||
|
||||
#endif
|
||||
#include "Windows/W32Util/DialogManager.h"
|
||||
#include "Windows/W32Util/ShellUtil.h"
|
||||
|
||||
@ -81,9 +82,11 @@ extern "C" {
|
||||
extern "C" {
|
||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||
}
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
CGEDebugger* geDebuggerWindow = 0;
|
||||
#endif
|
||||
|
||||
CDisasm *disasmWindow[MAX_CPUCOUNT] = {0};
|
||||
CGEDebugger *geDebuggerWindow = 0;
|
||||
CMemoryDlg *memoryWindow[MAX_CPUCOUNT] = {0};
|
||||
|
||||
static std::string langRegion;
|
||||
@ -592,8 +595,9 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
CtrlDisAsmView::init();
|
||||
CtrlMemView::init();
|
||||
CtrlRegisterList::init();
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
CGEDebugger::Init();
|
||||
|
||||
#endif
|
||||
DialogManager::AddDlg(vfpudlg = new CVFPUDlg(_hInstance, hwndMain, currentDebugMIPS));
|
||||
|
||||
MainWindow::CreateDebugWindows();
|
||||
|
@ -20,17 +20,19 @@
|
||||
|
||||
#include "Debugger/Debugger_Disasm.h"
|
||||
#include "Debugger/Debugger_MemoryDlg.h"
|
||||
#include "Windows/GEDebugger/GEDebugger.h"
|
||||
|
||||
#include "Common/CommonWindows.h"
|
||||
|
||||
#define MAX_CPUCOUNT 1
|
||||
|
||||
extern CDisasm *disasmWindow[MAX_CPUCOUNT];
|
||||
extern CGEDebugger *geDebuggerWindow ;
|
||||
extern CMemoryDlg *memoryWindow[MAX_CPUCOUNT];
|
||||
|
||||
#ifndef _M_ARM64
|
||||
#include "Windows/GEDebugger/GEDebugger.h"
|
||||
extern CGEDebugger* geDebuggerWindow;
|
||||
#endif
|
||||
|
||||
extern HMENU g_hPopupMenus;
|
||||
extern int g_activeWindow;
|
||||
|
||||
enum { WINDOW_MAINWINDOW, WINDOW_CPUDEBUGGER, WINDOW_GEDEBUGGER };
|
||||
enum { WINDOW_MAINWINDOW, WINDOW_CPUDEBUGGER, WINDOW_GEDEBUGGER };
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/stringutil.h"
|
||||
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
#if !PPSSPP_PLATFORM(UWP)
|
||||
#include "gfx/gl_common.h"
|
||||
|
||||
@ -13,6 +14,7 @@
|
||||
#include "GL/wglew.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "gfx_es2/gpu_features.h"
|
||||
|
||||
@ -119,7 +121,7 @@ void ProcessGPUFeatures() {
|
||||
|
||||
void CheckGLExtensions() {
|
||||
|
||||
#if !PPSSPP_PLATFORM(UWP)
|
||||
#if !PPSSPP_PLATFORM(UWP) && !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
|
||||
// Make sure to only do this once. It's okay to call CheckGLExtensions from wherever.
|
||||
if (extensionsDone)
|
||||
@ -569,7 +571,7 @@ static const char *glsl_fragment_prelude =
|
||||
"#endif\n";
|
||||
|
||||
std::string ApplyGLSLPrelude(const std::string &source, uint32_t stage) {
|
||||
#if !PPSSPP_PLATFORM(UWP)
|
||||
#if !PPSSPP_PLATFORM(UWP) && !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
std::string temp;
|
||||
std::string version = "";
|
||||
if (!gl_extensions.IsGLES && gl_extensions.IsCoreContext) {
|
||||
|
@ -26,7 +26,9 @@
|
||||
#include "Core/System.h"
|
||||
#include "GPU/Common/GPUDebugInterface.h"
|
||||
#include "GPU/GPUState.h"
|
||||
#if !defined(_M_ARM64) && !defined(_M_ARM)
|
||||
#include "Windows/GPU/WindowsGLContext.h"
|
||||
#endif
|
||||
#include "Windows/GPU/D3D9Context.h"
|
||||
#include "Windows/GPU/D3D11Context.h"
|
||||
#include "Windows/GPU/WindowsVulkanContext.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user