@@ -118,7 +118,7 @@ public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
118
118
for ( var discIdx = 0 ; discIdx < _discAssets . Count ; discIdx ++ )
119
119
{
120
120
// Creating file name to pass to dosbox
121
- var cdRomFileName = _discAssets [ discIdx ] . DiscName + " .cdrom";
121
+ var cdRomFileName = $ " { FileNames . CD } { discIdx } .cdrom";
122
122
123
123
// Getting disc data structure
124
124
var CDDataStruct = GetCDDataStruct ( _discAssets [ discIdx ] . DiscData ) ;
@@ -192,7 +192,7 @@ public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
192
192
string floppyMountLine = "imgmount a " ;
193
193
foreach ( var file in _floppyDiskImageFiles )
194
194
{
195
- string floppyNewName = FileNames . FD + _floppyDiskCount . ToString ( ) + Path . GetExtension ( file . RomPath ) ;
195
+ string floppyNewName = $ " { FileNames . FD } { _floppyDiskCount } { Path . GetExtension ( file . RomPath ) } " ;
196
196
_exe . AddReadonlyFile ( file . FileData , floppyNewName ) ;
197
197
floppyMountLine += floppyNewName + " " ;
198
198
_floppyDiskCount ++ ;
@@ -254,8 +254,8 @@ public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
254
254
configData = configData . Concat ( file . FileData ) ;
255
255
}
256
256
257
- _exe . AddReadonlyFile ( configData . ToArray ( ) , FileNames . DOSBOX_CONF ) ;
258
- Console . WriteLine ( "Configuration: {0}" , System . Text . Encoding . Default . GetString ( configData . ToArray ( ) ) ) ;
257
+ _exe . AddReadonlyFile ( configData . ToArray ( ) , FileNames . Config ) ;
258
+ Console . WriteLine ( $ "Configuration: { System . Text . Encoding . Default . GetString ( configData . ToArray ( ) ) } " ) ;
259
259
260
260
////////////// Initializing Core
261
261
if ( ! _libDOSBox . Init ( new LibDOSBox . InitSettings ( )
@@ -272,9 +272,9 @@ public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
272
272
// Setting framerate, if forced; otherwise, use the default.
273
273
// The default is necessary because DOSBox does not populate framerate value on init. Only after the first frame run
274
274
if ( _syncSettings . forceFPSNumerator > 0 && _syncSettings . forceFPSDenominator > 0 )
275
- updateFramerate ( _syncSettings . forceFPSNumerator , _syncSettings . forceFPSDenominator ) ;
275
+ UpdateFramerate ( _syncSettings . forceFPSNumerator , _syncSettings . forceFPSDenominator ) ;
276
276
else
277
- updateFramerate ( LibDOSBox . DEFAULT_FRAMERATE_NUMERATOR_DOS , LibDOSBox . DEFAULT_FRAMERATE_DENOMINATOR_DOS ) ;
277
+ UpdateFramerate ( LibDOSBox . DEFAULT_FRAMERATE_NUMERATOR_DOS , LibDOSBox . DEFAULT_FRAMERATE_DENOMINATOR_DOS ) ;
278
278
279
279
280
280
PostInit ( ) ;
@@ -452,7 +452,7 @@ protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController contro
452
452
return fi ;
453
453
}
454
454
455
- private void updateFramerate ( int numerator , int denominator )
455
+ private void UpdateFramerate ( int numerator , int denominator )
456
456
{
457
457
VsyncNumerator = numerator ;
458
458
VsyncDenominator = denominator ;
@@ -484,7 +484,7 @@ protected override void FrameAdvancePost()
484
484
if ( currentRefreshRateNumerator != newRefreshRateNumerator || currentRefreshRateDenominator != newRefreshRateDenominator )
485
485
if ( _syncSettings . forceFPSNumerator == 0 || _syncSettings . forceFPSDenominator == 0 )
486
486
if ( newRefreshRateNumerator > 0 && newRefreshRateDenominator > 0 )
487
- updateFramerate ( newRefreshRateNumerator , newRefreshRateDenominator ) ;
487
+ UpdateFramerate ( newRefreshRateNumerator , newRefreshRateDenominator ) ;
488
488
}
489
489
490
490
protected override void SaveStateBinaryInternal ( BinaryWriter writer )
@@ -524,12 +524,12 @@ protected override void LoadStateBinaryInternal(BinaryReader reader)
524
524
525
525
// Updating it now, if different
526
526
if ( newVsyncNumerator != VsyncNumerator || newVsyncDenominator != VsyncDenominator )
527
- updateFramerate ( newVsyncNumerator , newVsyncDenominator ) ;
527
+ UpdateFramerate ( newVsyncNumerator , newVsyncDenominator ) ;
528
528
}
529
529
530
530
private static class FileNames
531
531
{
532
- public const string DOSBOX_CONF = "dosbox-x.conf" ;
532
+ public const string Config = "dosbox-x.conf" ;
533
533
public const string FD = "FloppyDisk" ;
534
534
public const string CD = "CompactDisk" ;
535
535
public const string WHD = "__WritableHardDiskDrive" ;
0 commit comments