mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-04 05:51:19 +12:00
Merge branch 'cemu-project:main' into dev
This commit is contained in:
commit
584c8fde61
23 changed files with 183 additions and 39 deletions
59
BUILD.md
59
BUILD.md
|
@ -3,30 +3,57 @@
|
|||
## Windows
|
||||
|
||||
Prerequisites:
|
||||
- A recent version of Visual Studio 2022 with CMake tools component
|
||||
- A recent version of Visual Studio 2022 (recommended but not required) with the following additional components:
|
||||
- C++ CMake tools for Windows
|
||||
- Windows 10/11 SDK
|
||||
- git
|
||||
|
||||
Instructions:
|
||||
|
||||
1) Run `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||
2) Launch `Cemu/generate_vs_solution.bat`. If you installed VS to a custom location you may need to manually adjust the path inside the bat file
|
||||
3) Wait until done, then open `Cemu/build/Cemu.sln` in Visual Studio
|
||||
4) Right click 'CemuBin' project -> Set as startup project
|
||||
5) Then build the solution and once finished you can run and debug it
|
||||
1. Run `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||
2. Launch `Cemu/generate_vs_solution.bat`.
|
||||
- If you installed VS to a custom location or use VS 2019, you may need to manually change the path inside the .bat file
|
||||
3. Wait until it's done, then open `Cemu/build/Cemu.sln` in Visual Studio
|
||||
4. Then build the solution and once finished you can run and debug it, or build it and check the /bin folder for the final Cemu.exe.
|
||||
|
||||
You can also skip steps 3-5 and open the root folder of the cloned repo directly in Visual Studio (as a folder) and use the inbuilt cmake support, but be warned that cmake support in VS can be a bit finicky.
|
||||
You can also skip steps 3-5 and open the root folder of the cloned repo directly in Visual Studio (as a folder) and use the built-in cmake support but be warned that cmake support in VS can be a bit finicky.
|
||||
|
||||
## Linux
|
||||
|
||||
To compile Cemu, a recent enough compiler and STL with C++20 support is required! We use clang 12, other compilers may work as well.
|
||||
To compile Cemu, a recent enough compiler and STL with C++20 support is required! clang-12 or higher is what we recommend.
|
||||
|
||||
For ubuntu and most derivatives:
|
||||
### Installing dependencies
|
||||
|
||||
1) `sudo apt install -y libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev clang-12 nasm ninja-build`
|
||||
2) Run `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||
3) `cd Cemu`
|
||||
4) `mkdir build && cd build`
|
||||
5) `cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja`
|
||||
6) `ninja`
|
||||
#### For Ubuntu and derivatives:
|
||||
`sudo apt install -y git cmake ninja-build nasm libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev libpulse-dev`
|
||||
Additionally, for ubuntu 20.04 only:
|
||||
- `sudo apt install -y clang-12`
|
||||
- At step 3 while building, use
|
||||
`cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja`
|
||||
|
||||
Build instructions for other distributions will be added in the future!
|
||||
#### For Arch and derivatives:
|
||||
`sudo pacman -S git cmake clang ninja nasm base-devel linux-headers gtk3 libsecret libgcrypt systemd freeglut zip libpulse`
|
||||
|
||||
#### For Fedora and derivatives:
|
||||
`sudo dnf install git cmake clang ninja-build nasm kernel-headers gtk3-devel libsecret-devel libgcrypt-devel systemd-devel freeglut-devel perl-core zlib-devel cubeb-devel`
|
||||
|
||||
### Build Cemu using cmake
|
||||
1. `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||
2. `cd Cemu`
|
||||
3. `cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -G Ninja`
|
||||
4. `cmake --build build`
|
||||
5. You should now have a Cemu executable file in the /bin folder, which you can run using `./bin/Cemu`.
|
||||
|
||||
|
||||
#### Troubleshooting steps
|
||||
- If step 3 gives you an error about not being able to find ninja, try appending `-DCMAKE_MAKE_PROGRAM=/usr/bin/ninja` to the command and running it again.
|
||||
- If step 3 fails while compiling the boost-build dependency, it means you don't have a working/good standard library installation. Check the integrity of your system headers and making sure that C++ related packages are installed and intact.
|
||||
- If step 3 gives a random error, read the `[package-name-and-platform]-out.log` and `[package-name-and-platform]-err.log` for the actual reason to see if you might be lacking the headers from a dependency.
|
||||
- If step 3 is still failing or if you're not able to find the cause, please make an issue on our Github about it!
|
||||
- If step 4 gives you an error that contains something like `main.cpp.o: in function 'std::__cxx11::basic_string...`, you likely are experiencing a clang-14 issue. This can only be fixed by either lowering the clang version or using GCC, see below.
|
||||
- If step 4 gives you a different error, you could report it to this repo or try using GCC. Just make sure your standard library and compilers are updated since Cemu uses a lot of modern features!
|
||||
|
||||
#### Using GCC
|
||||
While we use and test Cemu using clang, using GCC might work better with your distro (they should be fairly similar performance/issues wise and should only be considered if compilation is the issue).
|
||||
You can use it by replacing the step 3 with the following:
|
||||
`cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -G Ninja`
|
||||
|
|
|
@ -89,7 +89,7 @@ if (NOT TARGET glslang::SPIRV AND TARGET SPIRV)
|
|||
add_library(glslang::SPIRV ALIAS SPIRV)
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
if (UNIX AND NOT APPLE)
|
||||
find_package(X11 REQUIRED)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -20,7 +20,11 @@ if(MSVC)
|
|||
# _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
||||
# _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
|
||||
elseif(UNIX)
|
||||
if(NOT APPLE)
|
||||
if(APPLE)
|
||||
add_definitions(-D_XOPEN_SOURCE)
|
||||
add_definitions(-DVK_USE_PLATFORM_MACOS_MVK)
|
||||
add_definitions(-DVK_USE_PLATFORM_METAL_EXT)
|
||||
else()
|
||||
add_definitions(-DVK_USE_PLATFORM_XLIB_KHR) # legacy. Do we need to support XLIB surfaces?
|
||||
add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
|
||||
endif()
|
||||
|
|
|
@ -6,7 +6,13 @@ endif()
|
|||
|
||||
file(GLOB_RECURSE CPP_FILES *.cpp)
|
||||
file(GLOB_RECURSE H_FILES *.h)
|
||||
add_library(CemuCafe ${CPP_FILES} ${H_FILES})
|
||||
|
||||
if(APPLE)
|
||||
file(GLOB_RECURSE MM_FILES *.mm)
|
||||
add_library(CemuCafe ${CPP_FILES} ${MM_FILES} ${H_FILES})
|
||||
else()
|
||||
add_library(CemuCafe ${CPP_FILES} ${H_FILES})
|
||||
endif()
|
||||
|
||||
set_property(TARGET CemuCafe PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
|
||||
|
|
|
@ -182,6 +182,8 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
|
|||
m_gfx_vendor = GfxVendor::Mesa;
|
||||
else if (boost::iequals(*option_vendorFilter, "nvidia"))
|
||||
m_gfx_vendor = GfxVendor::Nvidia;
|
||||
else if (boost::iequals(*option_vendorFilter, "apple"))
|
||||
m_gfx_vendor = GfxVendor::Apple;
|
||||
else
|
||||
cemuLog_force("Unknown value '{}' for vendorFilter", *option_vendorFilter);
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
#define GLVENDOR_INTEL_LEGACY (3)
|
||||
#define GLVENDOR_INTEL_NOLEGACY (4)
|
||||
#define GLVENDOR_INTEL (5)
|
||||
#define GLVENDOR_APPLE (6)
|
||||
|
||||
// decompiler
|
||||
|
||||
|
|
|
@ -161,6 +161,8 @@ int Latte_ThreadEntry()
|
|||
case GfxVendor::Nvidia:
|
||||
LatteGPUState.glVendor = GLVENDOR_NVIDIA;
|
||||
break;
|
||||
case GfxVendor::Apple:
|
||||
LatteGPUState.glVendor = GLVENDOR_APPLE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ enum class GfxVendor
|
|||
IntelNoLegacy,
|
||||
Intel,
|
||||
Nvidia,
|
||||
Apple,
|
||||
Mesa,
|
||||
|
||||
MAX
|
||||
|
|
9
src/Cafe/HW/Latte/Renderer/Vulkan/CocoaSurface.h
Normal file
9
src/Cafe/HW/Latte/Renderer/Vulkan/CocoaSurface.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#if BOOST_OS_MACOS
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
VkSurfaceKHR CreateCocoaSurface(VkInstance instance, void* handle);
|
||||
|
||||
#endif
|
45
src/Cafe/HW/Latte/Renderer/Vulkan/CocoaSurface.mm
Normal file
45
src/Cafe/HW/Latte/Renderer/Vulkan/CocoaSurface.mm
Normal file
|
@ -0,0 +1,45 @@
|
|||
#include "Cafe/HW/Latte/Renderer/Vulkan/CocoaSurface.h"
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/VulkanAPI.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <QuartzCore/CAMetalLayer.h>
|
||||
|
||||
@interface MetalView : NSView
|
||||
@end
|
||||
|
||||
@implementation MetalView
|
||||
|
||||
-(BOOL) wantsUpdateLayer { return YES; }
|
||||
|
||||
+(Class) layerClass { return [CAMetalLayer class]; }
|
||||
|
||||
-(CALayer*) makeBackingLayer { return [self.class.layerClass layer]; }
|
||||
|
||||
@end
|
||||
|
||||
VkSurfaceKHR CreateCocoaSurface(VkInstance instance, void* handle)
|
||||
{
|
||||
NSView* view = (NSView*)handle;
|
||||
|
||||
MetalView* childView = [[MetalView alloc] initWithFrame:view.bounds];
|
||||
childView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||
childView.wantsLayer = YES;
|
||||
|
||||
[view addSubview:childView];
|
||||
|
||||
VkMetalSurfaceCreateInfoEXT surface;
|
||||
surface.sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT;
|
||||
surface.pNext = NULL;
|
||||
surface.flags = 0;
|
||||
surface.pLayer = (CAMetalLayer*)childView.layer;
|
||||
|
||||
VkSurfaceKHR result;
|
||||
VkResult err;
|
||||
if ((err = vkCreateMetalSurfaceEXT(instance, &surface, nullptr, &result)) != VK_SUCCESS)
|
||||
{
|
||||
forceLog_printf("Cannot create a Metal Vulkan surface: %d", (sint32)err);
|
||||
throw std::runtime_error(fmt::format("Cannot create a Metal Vulkan surface: {}", err));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
|
@ -65,9 +65,13 @@ bool InitializeDeviceVulkan(VkDevice device)
|
|||
|
||||
void* dlopen_vulkan_loader()
|
||||
{
|
||||
#if BOOST_OS_LINUX
|
||||
void* vulkan_so = dlopen("libvulkan.so", RTLD_NOW);
|
||||
if(!vulkan_so)
|
||||
vulkan_so = dlopen("libvulkan.so.1", RTLD_NOW);
|
||||
#elif BOOST_OS_MACOS
|
||||
void* vulkan_so = dlopen("libMoltenVK.dylib", RTLD_NOW);
|
||||
#endif
|
||||
return vulkan_so;
|
||||
}
|
||||
|
||||
|
|
|
@ -135,6 +135,10 @@ VKFUNC_INSTANCE(vkCreateXcbSurfaceKHR);
|
|||
VKFUNC_INSTANCE(vkCreateWin32SurfaceKHR);
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_MACOS
|
||||
VKFUNC_INSTANCE(vkCreateMetalSurfaceEXT);
|
||||
#endif
|
||||
|
||||
VKFUNC_INSTANCE(vkDestroySurfaceKHR);
|
||||
VKFUNC_DEVICE(vkCreateSwapchainKHR);
|
||||
VKFUNC_DEVICE(vkDestroySwapchainKHR);
|
||||
|
|
|
@ -34,26 +34,29 @@ uint32 VulkanPipelineStableCache::BeginLoading(uint64 cacheTitleId)
|
|||
std::error_code ec;
|
||||
fs::create_directories(ActiveSettings::GetPath("shaderCache/transferable"), ec);
|
||||
const auto pathCacheFile = ActiveSettings::GetPath("shaderCache/transferable/{:016x}_vkpipeline.bin", cacheTitleId);
|
||||
|
||||
// init cache loader state
|
||||
g_vkCacheState.pipelineLoadIndex = 0;
|
||||
g_vkCacheState.pipelineMaxFileIndex = 0;
|
||||
g_vkCacheState.pipelinesLoaded = 0;
|
||||
g_vkCacheState.pipelinesQueued = 0;
|
||||
|
||||
// start async compilation threads
|
||||
m_compilationCount.store(0);
|
||||
m_compilationQueue.clear();
|
||||
|
||||
// get core count
|
||||
uint32 cpuCoreCount = GetPhysicalCoreCount();
|
||||
m_numCompilationThreads = std::clamp(cpuCoreCount, 1u, 8u);
|
||||
if (g_renderer->GetVendor() == GfxVendor::Nvidia)
|
||||
{
|
||||
forceLog_printf("Disable multi-threaded pipeline loading due to an issue with Nvidia drivers");
|
||||
if (VulkanRenderer::GetInstance()->GetDisableMultithreadedCompilation())
|
||||
m_numCompilationThreads = 1;
|
||||
}
|
||||
|
||||
for (uint32 i = 0; i < m_numCompilationThreads; i++)
|
||||
{
|
||||
std::thread compileThread(&VulkanPipelineStableCache::CompilerThread, this);
|
||||
compileThread.detach();
|
||||
}
|
||||
|
||||
// open cache file or create it
|
||||
cemu_assert_debug(s_cache == nullptr);
|
||||
const uint32 cacheFileVersion = 1;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "Cafe/HW/Latte/Renderer/Vulkan/LatteTextureVk.h"
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.h"
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/VulkanTextureReadback.h"
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/CocoaSurface.h"
|
||||
|
||||
#include "Cafe/HW/Latte/Core/LatteBufferCache.h"
|
||||
#include "Cafe/HW/Latte/Core/LattePerformanceMonitor.h"
|
||||
|
@ -12,6 +13,7 @@
|
|||
#include "Cafe/CafeSystem.h"
|
||||
|
||||
#include "util/helpers/helpers.h"
|
||||
#include "util/helpers/StringHelpers.h"
|
||||
|
||||
#include "config/ActiveSettings.h"
|
||||
#include "config/CemuConfig.h"
|
||||
|
@ -106,6 +108,8 @@ std::vector<VulkanRenderer::DeviceInfo> VulkanRenderer::GetDevices()
|
|||
requiredExtensions.emplace_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
|
||||
#elif BOOST_OS_LINUX
|
||||
requiredExtensions.emplace_back(VK_KHR_XLIB_SURFACE_EXTENSION_NAME);
|
||||
#elif BOOST_OS_MACOS
|
||||
requiredExtensions.emplace_back(VK_EXT_METAL_SURFACE_EXTENSION_NAME);
|
||||
#endif
|
||||
|
||||
VkApplicationInfo app_info{};
|
||||
|
@ -188,16 +192,38 @@ void VulkanRenderer::DetermineVendor()
|
|||
case 0x1002:
|
||||
m_vendor = GfxVendor::AMD;
|
||||
break;
|
||||
case 0x106B:
|
||||
m_vendor = GfxVendor::Apple;
|
||||
break;
|
||||
}
|
||||
|
||||
if (IsRunningInWine())
|
||||
m_vendor = GfxVendor::Mesa;
|
||||
|
||||
forceLog_printf("Using GPU: %s", properties.properties.deviceName);
|
||||
|
||||
if (m_featureControl.deviceExtensions.driver_properties)
|
||||
forceLog_printf("Driver version: %s", driverProperties.driverInfo)
|
||||
{
|
||||
forceLog_printf("Driver version: %s", driverProperties.driverInfo);
|
||||
|
||||
if(m_vendor == GfxVendor::Nvidia)
|
||||
{
|
||||
// multithreaded pipelines on nvidia (requires 515 or higher)
|
||||
m_featureControl.disableMultithreadedCompilation = (StringHelpers::ToInt(std::string(driverProperties.driverInfo)) < 515);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
forceLog_printf("Driver version (as stored in device info): %08X", properties.properties.driverVersion);
|
||||
|
||||
if(m_vendor == GfxVendor::Nvidia)
|
||||
{
|
||||
// if the driver does not support the extension,
|
||||
// it is assumed the driver is under version 515
|
||||
m_featureControl.disableMultithreadedCompilation = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VulkanRenderer::GetDeviceFeatures()
|
||||
|
@ -382,8 +408,10 @@ VulkanRenderer::VulkanRenderer()
|
|||
deviceFeatures.independentBlend = VK_TRUE;
|
||||
deviceFeatures.samplerAnisotropy = VK_TRUE;
|
||||
deviceFeatures.imageCubeArray = VK_TRUE;
|
||||
#if !BOOST_OS_MACOS
|
||||
deviceFeatures.geometryShader = VK_TRUE;
|
||||
deviceFeatures.logicOp = VK_TRUE;
|
||||
#endif
|
||||
deviceFeatures.occlusionQueryPrecise = VK_TRUE;
|
||||
deviceFeatures.depthClamp = VK_TRUE;
|
||||
deviceFeatures.depthBiasClamp = VK_TRUE;
|
||||
|
@ -1145,6 +1173,8 @@ std::vector<const char*> VulkanRenderer::CheckInstanceExtensionSupport(FeatureCo
|
|||
requiredInstanceExtensions.emplace_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
|
||||
#elif BOOST_OS_LINUX
|
||||
requiredInstanceExtensions.emplace_back(VK_KHR_XLIB_SURFACE_EXTENSION_NAME);
|
||||
#elif BOOST_OS_MACOS
|
||||
requiredInstanceExtensions.emplace_back(VK_EXT_METAL_SURFACE_EXTENSION_NAME);
|
||||
#endif
|
||||
if (cafeLog_isLoggingFlagEnabled(LOG_TYPE_VULKAN_VALIDATION))
|
||||
requiredInstanceExtensions.emplace_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
|
||||
|
@ -1322,8 +1352,7 @@ VkSurfaceKHR VulkanRenderer::CreateFramebufferSurface(VkInstance instance, struc
|
|||
#elif BOOST_OS_LINUX
|
||||
return CreateXlibSurface(instance, windowInfo.xlib_display, windowInfo.xlib_window);
|
||||
#elif BOOST_OS_MACOS
|
||||
cemu_assert_unimplemented();
|
||||
return nullptr;
|
||||
return CreateCocoaSurface(instance, windowInfo.handle);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -548,6 +548,7 @@ private:
|
|||
}limits;
|
||||
|
||||
bool debugMarkersSupported = false; // frame debugger is attached
|
||||
bool disableMultithreadedCompilation = false; // for old nvidia drivers
|
||||
|
||||
}m_featureControl{};
|
||||
static bool CheckDeviceExtensionSupport(const VkPhysicalDevice device, FeatureControl& info);
|
||||
|
@ -1012,7 +1013,8 @@ private:
|
|||
|
||||
|
||||
public:
|
||||
bool useTFViaSSBO() { return m_featureControl.mode.useTFEmulationViaSSBO; };
|
||||
bool GetDisableMultithreadedCompilation() { return m_featureControl.disableMultithreadedCompilation; }
|
||||
bool useTFViaSSBO() { return m_featureControl.mode.useTFEmulationViaSSBO; }
|
||||
bool IsDebugUtilsEnabled() const
|
||||
{
|
||||
return m_featureControl.debugMarkersSupported && m_featureControl.instanceExtensions.debug_utils;
|
||||
|
|
|
@ -38,7 +38,7 @@ target_link_libraries(CemuCommon PRIVATE
|
|||
glm::glm
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
if (UNIX AND NOT APPLE)
|
||||
target_link_libraries(CemuCommon PRIVATE X11::X11 X11::Xrender X11::Xutil)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ void wxDownloadManagerList::OnItemSelected(wxListEvent& event)
|
|||
|
||||
enum ContextMenuEntries
|
||||
{
|
||||
kContextMenuRetry,
|
||||
kContextMenuRetry = wxID_HIGHEST + 1,
|
||||
kContextMenuDownload,
|
||||
kContextMenuPause,
|
||||
kContextMenuResume,
|
||||
|
|
|
@ -435,7 +435,7 @@ void wxGameList::OnKeyDown(wxListEvent& event)
|
|||
|
||||
enum ContextMenuEntries
|
||||
{
|
||||
kContextMenuRefreshGames,
|
||||
kContextMenuRefreshGames = wxID_HIGHEST + 1,
|
||||
|
||||
kContextMenuStart,
|
||||
kWikiPage,
|
||||
|
@ -655,7 +655,7 @@ void wxGameList::OnColumnRightClick(wxListEvent& event)
|
|||
{
|
||||
enum ItemIds
|
||||
{
|
||||
ResetWidth,
|
||||
ResetWidth = wxID_HIGHEST + 1,
|
||||
ResetOrder,
|
||||
|
||||
ShowName,
|
||||
|
|
|
@ -728,7 +728,7 @@ void wxTitleManagerList::OnItemSelected(wxListEvent& event)
|
|||
|
||||
enum ContextMenuEntries
|
||||
{
|
||||
kContextMenuOpenDirectory,
|
||||
kContextMenuOpenDirectory = wxID_HIGHEST + 1,
|
||||
kContextMenuDelete,
|
||||
kContextMenuLaunch,
|
||||
kContextMenuVerifyGameFiles,
|
||||
|
|
|
@ -90,6 +90,8 @@ void gui_updateWindowTitles(bool isIdle, bool isLoading, double fps)
|
|||
graphicMode = "[Intel GPU]";
|
||||
else if (LatteGPUState.glVendor == GLVENDOR_NVIDIA)
|
||||
graphicMode = "[NVIDIA GPU]";
|
||||
else if (LatteGPUState.glVendor == GLVENDOR_APPLE)
|
||||
graphicMode = "[Apple GPU]";
|
||||
|
||||
const uint64 titleId = CafeSystem::GetForegroundTitleId();
|
||||
windowText.append(fmt::format(" - FPS: {:.2f} {} {} [TitleId: {:08x}-{:08x}]", (double)fps, renderer, graphicMode, (uint32)(titleId >> 32), (uint32)(titleId & 0xFFFFFFFF)));
|
||||
|
@ -197,6 +199,8 @@ void gui_initHandleContextFromWxWidgetsWindow(WindowHandleInfo& handleInfoOut, c
|
|||
{
|
||||
cemuLog_log(LogType::Force, "Unable to get xlib display");
|
||||
}
|
||||
#else
|
||||
handleInfoOut.handle = wxw->GetHandle();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ struct WindowHandleInfo
|
|||
//xcb_window_t xcb_window{};
|
||||
// Wayland
|
||||
// todo
|
||||
#else
|
||||
void* handle;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
enum
|
||||
{
|
||||
// options
|
||||
REFRESH_ID,
|
||||
REFRESH_ID = wxID_HIGHEST + 1,
|
||||
AUTO_REFRESH_ID,
|
||||
CLOSE_ID,
|
||||
GPLIST_ID,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "Fiber.h"
|
||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
||||
#define _XOPEN_SOURCE
|
||||
#include <ucontext.h>
|
||||
|
||||
thread_local Fiber* sCurrentFiber{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue