File tree Expand file tree Collapse file tree 2 files changed +6
-19
lines changed
src/BizHawk.Client.EmuHawk Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -130,15 +130,14 @@ public void DoFrameAdvanceAndUnpause()
130
130
131
131
public void FrameSkip ( int numFrames )
132
132
{
133
- if ( numFrames > 0 )
134
- {
135
- _config . FrameSkip = numFrames ;
136
- _mainForm . FrameSkipMessage ( ) ;
137
- }
138
- else
133
+ if ( numFrames < 0 )
139
134
{
140
135
_logCallback ( "Invalid frame skip value" ) ;
136
+ return ;
141
137
}
138
+
139
+ _config . FrameSkip = numFrames ;
140
+ _mainForm . FrameSkipMessage ( ) ;
142
141
}
143
142
144
143
private void GetAllInputs ( )
Original file line number Diff line number Diff line change @@ -76,19 +76,7 @@ public int BufferWidth()
76
76
77
77
[ LuaMethodExample ( "client.frameskip( 8 );" ) ]
78
78
[ LuaMethod ( "frameskip" , "Sets the frame skip value of the client UI (use 0 to disable)" ) ]
79
- public void FrameSkip ( int numFrames )
80
- {
81
- //TODO delegate to APIs.EmuClient (impl uses `> 0` instead of `>= 0`)
82
- if ( numFrames >= 0 )
83
- {
84
- GlobalWin . Config . FrameSkip = numFrames ;
85
- MainForm . FrameSkipMessage ( ) ;
86
- }
87
- else
88
- {
89
- Log ( "Invalid frame skip value" ) ;
90
- }
91
- }
79
+ public void FrameSkip ( int numFrames ) => APIs . EmuClient . FrameSkip ( numFrames ) ;
92
80
93
81
[ LuaMethodExample ( "client.invisibleemulation( true );" ) ]
94
82
[ LuaMethod ( "invisibleemulation" , "Disables and enables emulator updates" ) ]
You can’t perform that action at this time.
0 commit comments