mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	renderer_vulkan: Import host memory for screenshots (#7132)
This commit is contained in:
		
							parent
							
								
									23ca10472a
								
							
						
					
					
						commit
						831c9c4a38
					
				
					 10 changed files with 254 additions and 21 deletions
				
			
		|  | @ -8,12 +8,11 @@ | |||
| #include <sysinfoapi.h> | ||||
| #else | ||||
| #include <sys/types.h> | ||||
| #include <unistd.h> | ||||
| #if defined(__APPLE__) || defined(__FreeBSD__) | ||||
| #include <sys/sysctl.h> | ||||
| #elif defined(__linux__) | ||||
| #include <sys/sysinfo.h> | ||||
| #else | ||||
| #include <unistd.h> | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
|  | @ -64,4 +63,14 @@ const MemoryInfo GetMemInfo() { | |||
|     return mem_info; | ||||
| } | ||||
| 
 | ||||
| u64 GetPageSize() { | ||||
| #ifdef _WIN32 | ||||
|     SYSTEM_INFO info; | ||||
|     ::GetSystemInfo(&info); | ||||
|     return static_cast<u64>(info.dwPageSize); | ||||
| #else | ||||
|     return static_cast<u64>(sysconf(_SC_PAGESIZE)); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| } // namespace Common
 | ||||
|  |  | |||
|  | @ -19,4 +19,10 @@ struct MemoryInfo { | |||
|  */ | ||||
| [[nodiscard]] const MemoryInfo GetMemInfo(); | ||||
| 
 | ||||
| /**
 | ||||
|  * Gets the page size of the host system | ||||
|  * @return Page size in bytes of the host system | ||||
|  */ | ||||
| u64 GetPageSize(); | ||||
| 
 | ||||
| } // namespace Common
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue