mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	Move input values into an array
This commit is contained in:
		
							parent
							
								
									453764aefc
								
							
						
					
					
						commit
						1bc7829ee9
					
				
					 7 changed files with 80 additions and 145 deletions
				
			
		| 
						 | 
				
			
			@ -35,6 +35,16 @@ static Kernel::SharedPtr<Kernel::Event> event_debug_pad;
 | 
			
		|||
static u32 next_pad_index;
 | 
			
		||||
static u32 next_touch_index;
 | 
			
		||||
 | 
			
		||||
const std::array<Service::HID::PadState, Settings::NativeInput::NUM_INPUTS> pad_mapping = {
 | 
			
		||||
    Service::HID::PAD_A, Service::HID::PAD_B, Service::HID::PAD_X, Service::HID::PAD_Y,
 | 
			
		||||
    Service::HID::PAD_L, Service::HID::PAD_R, Service::HID::PAD_ZL, Service::HID::PAD_ZR,
 | 
			
		||||
    Service::HID::PAD_START, Service::HID::PAD_SELECT, Service::HID::PAD_NONE,
 | 
			
		||||
    Service::HID::PAD_UP, Service::HID::PAD_DOWN, Service::HID::PAD_LEFT, Service::HID::PAD_RIGHT,
 | 
			
		||||
    Service::HID::PAD_CIRCLE_UP, Service::HID::PAD_CIRCLE_DOWN, Service::HID::PAD_CIRCLE_LEFT, Service::HID::PAD_CIRCLE_RIGHT,
 | 
			
		||||
    Service::HID::PAD_C_UP, Service::HID::PAD_C_DOWN, Service::HID::PAD_C_LEFT, Service::HID::PAD_C_RIGHT
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// TODO(peachum):
 | 
			
		||||
// Add a method for setting analog input from joystick device for the circle Pad.
 | 
			
		||||
//
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,7 @@
 | 
			
		|||
#ifndef _MSC_VER
 | 
			
		||||
#include <cstddef>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "core/settings.h"
 | 
			
		||||
#include "common/bit_field.h"
 | 
			
		||||
#include "common/common_funcs.h"
 | 
			
		||||
#include "common/common_types.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -157,6 +157,9 @@ const PadState PAD_CIRCLE_LEFT  = {{1u << 29}};
 | 
			
		|||
const PadState PAD_CIRCLE_UP    = {{1u << 30}};
 | 
			
		||||
const PadState PAD_CIRCLE_DOWN  = {{1u << 31}};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern const std::array<Service::HID::PadState, Settings::NativeInput::NUM_INPUTS> pad_mapping;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * HID::GetIPCHandles service function
 | 
			
		||||
 *  Inputs:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue