6565
6666static NSString * const OEPSCSX2InternalResolution = @" OEPSCSX2InternalResolution" ;
6767static NSString * const OEPSCSX2BlendingAccuracy = @" OEPSCSX2BlendingAccuracy" ;
68+ static NSString * const OEPSCSX2BilinearFiltering = @" OEPSCSX2BilinearFiltering" ;
6869
6970namespace GSDump
7071{
@@ -104,7 +105,9 @@ - (instancetype)init
104105 _maxDiscs = 0 ;
105106 _displayModes = [[NSMutableDictionary alloc ] initWithDictionary:
106107 @{OEPSCSX2InternalResolution: @1 ,
107- OEPSCSX2BlendingAccuracy: @1 }];
108+ OEPSCSX2BlendingAccuracy: @1 ,
109+ OEPSCSX2BilinearFiltering: @1 ,
110+ }];
108111 screenRect = OEIntRectMake (0 , 0 , 640 * 4 , 448 * 4 );
109112 }
110113 return self;
@@ -522,6 +525,7 @@ - (void)setDisplayModeInfo:(NSDictionary<NSString *, id> *)displayModeInfo
522525 } defaultValues[] = {
523526 { OEPSCSX2InternalResolution, [NSNumber class ], @1 },
524527 { OEPSCSX2BlendingAccuracy, [NSNumber class ], @1 },
528+ { OEPSCSX2BilinearFiltering, [NSNumber class ], @1 },
525529 };
526530 /* validate the defaults to avoid crashes caused by users playing
527531 * around where they shouldn't */
@@ -565,6 +569,10 @@ - (void)setDisplayModeInfo:(NSDictionary<NSString *, id> *)displayModeInfo
565569 OptionWithValue (@" High" , OEPSCSX2BlendingAccuracy, 3 ),
566570 OptionWithValue (@" Full (Very Slow)" , OEPSCSX2BlendingAccuracy, 4 ),
567571 OptionWithValue (@" Ultra (Ultra Slow, or M1)" , OEPSCSX2BlendingAccuracy, 5 )]),
572+ OEDisplayMode_Submenu (@" Bilinear Filtering" ,
573+ @[OptionWithValue (@" None" , OEPSCSX2BilinearFiltering, 0 ),
574+ OptionWithValue (@" Smooth" , OEPSCSX2BilinearFiltering, 1 ),
575+ OptionWithValue (@" Sharp" , OEPSCSX2BilinearFiltering, 2 )]),
568576 ];
569577
570578#undef OptionWithValue
@@ -586,6 +594,8 @@ - (void)changeDisplayWithMode:(NSString *)displayMode
586594 VMManager::RequestDisplaySize ([currentVal floatValue ]);
587595 } else if ([key isEqualToString: OEPSCSX2BlendingAccuracy]) {
588596 s_base_settings_interface->SetIntValue (" EmuCore/GS" , " accurate_blending_unit" , [currentVal intValue ]);
597+ } else if ([key isEqualToString: OEPSCSX2BilinearFiltering]) {
598+ s_base_settings_interface->SetIntValue (" EmuCore/GS" , " linear_present_mode" , [currentVal intValue ]);
589599 }
590600
591601 VMManager::ApplySettings ();
0 commit comments