mirror of
				https://github.com/Zelda64Recomp/Zelda64Recomp.git
				synced 2025-10-30 08:03:03 +00:00 
			
		
		
		
	disable cursor movement threshold when controller is the primary input (#14)
This commit is contained in:
		
							parent
							
								
									1ec20de2f5
								
							
						
					
					
						commit
						52278c5a4d
					
				
					 3 changed files with 11 additions and 0 deletions
				
			
		|  | @ -114,6 +114,8 @@ namespace recomp { | |||
| 	}; | ||||
| 
 | ||||
| 	PromptContext *get_prompt_context(void); | ||||
| 
 | ||||
| 	bool get_cont_active(void); | ||||
| } | ||||
| 
 | ||||
| #endif | ||||
|  |  | |||
|  | @ -191,6 +191,10 @@ void recomp::set_cont_or_kb(bool cont_interacted) { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| bool recomp::get_cont_active() { | ||||
| 	return cont_active; | ||||
| } | ||||
| 
 | ||||
| void close_config_menu_impl() { | ||||
| 	recomp::save_config(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -1260,6 +1260,11 @@ void draw_hook(RT64::RenderCommandList* command_list, RT64::RenderFramebuffer* s | |||
|                 } | ||||
|                 last_mouse_pos[0] = cur_event.motion.x; | ||||
|                 last_mouse_pos[1] = cur_event.motion.y; | ||||
| 
 | ||||
|                 // if controller is the primary input, don't use mouse movement to allow cursor to reactivate
 | ||||
|                 if (recomp::get_cont_active()) { | ||||
|                     break; | ||||
|                 } | ||||
|             } | ||||
|             // fallthrough
 | ||||
|             case SDL_EventType::SDL_MOUSEBUTTONDOWN: | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 thecozies
						thecozies