File tree Expand file tree Collapse file tree 5 files changed +50
-6
lines changed Expand file tree Collapse file tree 5 files changed +50
-6
lines changed Original file line number Diff line number Diff line change @@ -523,14 +523,16 @@ Amiga::refreshRate() const
523523
524524    } else  {
525525
526-         return  nativeRefreshRate () * config.speedBoost  / 100.0 ;
526+         auto  boost = config.speedBoost  ? config.speedBoost  : 100 ;
527+         return  nativeRefreshRate () * boost / 100.0 ;
527528    }
528529}
529530
530531i64 
531532Amiga::masterClockFrequency () const 
532533{
533-     return  nativeMasterClockFrequency () * config.speedBoost  / 100 ;
534+     auto  boost = config.speedBoost  ? config.speedBoost  : 100 ;
535+     return  nativeMasterClockFrequency () * boost / 100 ;
534536}
535537
536538void 
Original file line number Diff line number Diff line change @@ -676,7 +676,6 @@ CommandConsole::initCommands(Command &root)
676676        });
677677
678678        cmd = registerComponent (remoteManager.serServer , root / " server" 
679- 
680679        cmd = registerComponent (remoteManager.rshServer , root / " server" 
681680
682681        root.add ({" server" " start" 
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ namespace vamiga {
1616void 
1717DebugConsole::_pause ()
1818{
19-     retroShell.asyncExec (" state" 
19+     *this  << ' \n ' ' \n ' 
20+     exec (" state" 
21+     *this  << getPrompt ();
2022}
2123
2224string
Original file line number Diff line number Diff line change @@ -855,17 +855,51 @@ KeyboardAPI::isPressed(KeyCode key) const
855855void 
856856KeyboardAPI::press (KeyCode key, double  delay, double  duration)
857857{
858-     emu-> put ( Cmd (CMD_KEY_PRESS, KeyCmd { . keycode  = key, . delay  = delay })); 
858+     if  ( delay ==  0.0 ) { 
859859
860+         keyboard->press (key);
861+         emu->isDirty  = true ;
862+ 
863+     } else  {
864+         
865+         emu->put (Cmd (CMD_KEY_PRESS, KeyCmd { .keycode  = key, .delay  = delay }));
866+     }
860867    if  (duration != 0.0 ) {
868+         
861869        emu->put (Cmd (CMD_KEY_RELEASE, KeyCmd { .keycode  = key, .delay  = delay + duration }));
862870    }
863871}
864872
873+ void 
874+ KeyboardAPI::toggle (KeyCode key, double  delay, double  duration)
875+ {
876+     if  (delay == 0.0 ) {
877+         
878+         keyboard->toggle (key);
879+         emu->isDirty  = true ;
880+         
881+     } else  {
882+         
883+         emu->put (Cmd (CMD_KEY_TOGGLE, KeyCmd { .keycode  = key, .delay  = delay }));
884+     }
885+     if  (duration != 0.0 ) {
886+         
887+         emu->put (Cmd (CMD_KEY_TOGGLE, KeyCmd { .keycode  = key, .delay  = delay + duration }));
888+     }
889+ }
890+ 
865891void 
866892KeyboardAPI::release (KeyCode key, double  delay)
867893{
868-     emu->put (Cmd (CMD_KEY_RELEASE, KeyCmd { .keycode  = key, .delay  = delay }));
894+     if  (delay == 0.0 ) {
895+         
896+         keyboard->release (key);
897+         emu->isDirty  = true ;
898+         
899+     } else  {
900+         
901+         emu->put (Cmd (CMD_KEY_RELEASE, KeyCmd { .keycode  = key, .delay  = delay }));
902+     }
869903}
870904
871905void 
Original file line number Diff line number Diff line change @@ -782,6 +782,13 @@ struct KeyboardAPI : public API {
782782     */  
783783    void  press (KeyCode key, double  delay = 0.0 , double  duration = 0.0 );
784784
785+     /* * @brief  Toggles a key
786+      *  @param  key         The key to toggle. 
787+      *  @param  delay       An optional delay in seconds until the key is toggled. 
788+      *  @param  duration    If specified, the key will be toggled again after the additional delay. 
789+      */  
790+     void  toggle (KeyCode key, double  delay = 0.0 , double  duration = 0.0 );
791+ 
785792    /* * @brief  Releases a key
786793     *  @param  key     The key to release. 
787794     *  @param  delay   An optional delay in seconds. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments