File tree Expand file tree Collapse file tree 3 files changed +11
-19
lines changed Expand file tree Collapse file tree 3 files changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,6 @@ namespace cage
8181		struct  CAGE_ENGINE_API  EngineTick
8282		{};
8383	}
84- 	CAGE_ENGINE_API void  keybindsDispatchGameTick ();
85- 	CAGE_ENGINE_API void  keybindsDispatchEngineTick ();
8684
8785	CAGE_ENGINE_API void  keybindsGuiWidget (guiBuilder::GuiBuilder *g, Keybind *keybind);
8886	CAGE_ENGINE_API void  keybindsGuiTable (guiBuilder::GuiBuilder *g, const  String &filterPrefix = {});
Original file line number Diff line number Diff line change @@ -228,9 +228,17 @@ namespace cage
228228				if  (active)
229229				{
230230					if  (input.has <input::GameTick>() && any (config.modes  & KeybindModesFlags::GameTick))
231- 						return  event (input);
231+ 					{
232+ 						if  (event)
233+ 							event (input);
234+ 						return  false ; //  ticks always propagate
235+ 					}
232236					if  (input.has <input::EngineTick>() && any (config.modes  & KeybindModesFlags::EngineTick))
233- 						return  event (input);
237+ 					{
238+ 						if  (event)
239+ 							event (input);
240+ 						return  false ; //  ticks always propagate
241+ 					}
234242				}
235243				for  (const  auto  &it : matchers)
236244				{
@@ -521,20 +529,6 @@ namespace cage
521529		}
522530	}
523531
524- 	void  keybindsDispatchGameTick ()
525- 	{
526- 		GenericInput g = input::GameTick ();
527- 		for  (KeybindImpl *it : global ())
528- 			it->process (g);
529- 	}
530- 
531- 	void  keybindsDispatchEngineTick ()
532- 	{
533- 		GenericInput g = input::EngineTick ();
534- 		for  (KeybindImpl *it : global ())
535- 			it->process (g);
536- 	}
537- 
538532	void  keybindsGuiWidget (GuiBuilder *g, Keybind *k_)
539533	{
540534		KeybindImpl *k = (KeybindImpl *)k_;
Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ namespace cage
355355				}
356356				{
357357					ProfilingScope profiling (" keybinds engine tick"  );
358- 					keybindsDispatchEngineTick ( );
358+ 					engineEvents (). dispatch ( input::EngineTick () );
359359				}
360360				{
361361					ProfilingScope profiling (" control callback"  );
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments