mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	Kernel: Capture SharedMemory attributes at creation, not when mapping
This commit is contained in:
		
							parent
							
								
									088f6ae2c6
								
							
						
					
					
						commit
						c96f22490a
					
				
					 7 changed files with 51 additions and 28 deletions
				
			
		| 
						 | 
				
			
			@ -48,7 +48,7 @@ static u32 next_touch_index;
 | 
			
		|||
//     * Set PadData.current_state.circle_right = 1 if current PadEntry.circle_pad_y <= -41
 | 
			
		||||
 | 
			
		||||
void Update() {
 | 
			
		||||
    SharedMem* mem = reinterpret_cast<SharedMem*>(shared_mem->GetPointer().ValueOr(nullptr));
 | 
			
		||||
    SharedMem* mem = reinterpret_cast<SharedMem*>(shared_mem->GetPointer());
 | 
			
		||||
    const PadState state = VideoCore::g_emu_window->GetPadState();
 | 
			
		||||
 | 
			
		||||
    if (mem == nullptr) {
 | 
			
		||||
| 
						 | 
				
			
			@ -163,7 +163,9 @@ void Init() {
 | 
			
		|||
    AddService(new HID_U_Interface);
 | 
			
		||||
    AddService(new HID_SPVR_Interface);
 | 
			
		||||
 | 
			
		||||
    shared_mem = SharedMemory::Create("HID:SharedMem");
 | 
			
		||||
    using Kernel::MemoryPermission;
 | 
			
		||||
    shared_mem = SharedMemory::Create(0x1000, MemoryPermission::ReadWrite,
 | 
			
		||||
            MemoryPermission::Read, "HID:SharedMem");
 | 
			
		||||
 | 
			
		||||
    next_pad_index = 0;
 | 
			
		||||
    next_touch_index = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue