diff --git a/desmume/src/cocoa/DefaultUserPrefs.plist b/desmume/src/cocoa/DefaultUserPrefs.plist
index 8c72a93f1..101d8a702 100644
--- a/desmume/src/cocoa/DefaultUserPrefs.plist
+++ b/desmume/src/cocoa/DefaultUserPrefs.plist
@@ -686,6 +686,8 @@
Render3D_Fog
+ Render3D_FragmentSamplingHack
+
Render3D_HighPrecisionColorInterpolation
Render3D_LineHack
diff --git a/desmume/src/cocoa/OGLDisplayOutput.cpp b/desmume/src/cocoa/OGLDisplayOutput.cpp
index 020274f61..adfbe110a 100644
--- a/desmume/src/cocoa/OGLDisplayOutput.cpp
+++ b/desmume/src/cocoa/OGLDisplayOutput.cpp
@@ -363,7 +363,7 @@ void OGLVideoOutput::UpdateDisplayTransformationOGL()
}
}
-void OGLVideoOutput::RespondToVideoFilterChangeOGL(const VideoFilterTypeID videoFilterTypeID)
+void OGLVideoOutput::SetVideoFilterOGL(const VideoFilterTypeID videoFilterTypeID)
{
this->_vfSingle->ChangeFilterByID(videoFilterTypeID);
this->_vfDual->ChangeFilterByID(videoFilterTypeID);
diff --git a/desmume/src/cocoa/OGLDisplayOutput.h b/desmume/src/cocoa/OGLDisplayOutput.h
index d0b25e3db..911a0a47f 100644
--- a/desmume/src/cocoa/OGLDisplayOutput.h
+++ b/desmume/src/cocoa/OGLDisplayOutput.h
@@ -70,6 +70,10 @@ protected:
GLubyte vtxIndexBuffer[12];
size_t _vtxBufferOffset;
+ void CalculateDisplayNormalSize(double *w, double *h);
+ void UpdateVertices();
+ void UpdateTexCoords(GLfloat s, GLfloat t);
+
void GetExtensionSetOGL(std::set *oglExtensionSet);
bool IsExtensionPresent(const std::set &oglExtensionSet, const std::string &extensionName) const;
bool SetupShadersOGL(const char *vertexProgram, const char *fragmentProgram);
@@ -90,11 +94,7 @@ public:
virtual void RenderOGL();
virtual void SetViewportSizeOGL(GLsizei w, GLsizei h);
virtual void UpdateDisplayTransformationOGL();
- virtual void RespondToVideoFilterChangeOGL(const VideoFilterTypeID videoFilterTypeID);
-
- void CalculateDisplayNormalSize(double *w, double *h);
- void UpdateVertices();
- void UpdateTexCoords(GLfloat s, GLfloat t);
+ virtual void SetVideoFilterOGL(const VideoFilterTypeID videoFilterTypeID);
int GetDisplayMode();
void SetDisplayMode(int dispMode);
diff --git a/desmume/src/cocoa/cocoa_GPU.h b/desmume/src/cocoa/cocoa_GPU.h
index b2e9dce83..b9892b088 100644
--- a/desmume/src/cocoa/cocoa_GPU.h
+++ b/desmume/src/cocoa/cocoa_GPU.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 DeSmuME team
+ Copyright (C) 2013-2014 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -54,6 +54,7 @@
@property (assign) NSUInteger render3DThreads;
@property (assign) BOOL render3DLineHack;
@property (assign) BOOL render3DMultisample;
+@property (assign) BOOL render3DFragmentSamplingHack;
- (BOOL) gpuStateByBit:(const UInt32)stateBit;
- (BOOL) isGPUTypeDisplayed:(const NSInteger)theGpuType;
diff --git a/desmume/src/cocoa/cocoa_GPU.mm b/desmume/src/cocoa/cocoa_GPU.mm
index f3a4359e8..489dafffa 100644
--- a/desmume/src/cocoa/cocoa_GPU.mm
+++ b/desmume/src/cocoa/cocoa_GPU.mm
@@ -67,6 +67,7 @@ GPU3DInterface *core3DList[] = {
@dynamic render3DThreads;
@dynamic render3DLineHack;
@dynamic render3DMultisample;
+@dynamic render3DFragmentSamplingHack;
- (id)init
@@ -321,6 +322,22 @@ GPU3DInterface *core3DList[] = {
return state;
}
+- (void) setRender3DFragmentSamplingHack:(BOOL)state
+{
+ pthread_mutex_lock(self.mutexProducer);
+ CommonSettings.GFX3D_TXTHack = state ? true : false;
+ pthread_mutex_unlock(self.mutexProducer);
+}
+
+- (BOOL) render3DFragmentSamplingHack
+{
+ pthread_mutex_lock(self.mutexProducer);
+ const BOOL state = CommonSettings.GFX3D_TXTHack ? YES : NO;
+ pthread_mutex_unlock(self.mutexProducer);
+
+ return state;
+}
+
- (void) setLayerMainGPU:(BOOL)gpuState
{
pthread_mutex_lock(self.mutexProducer);
diff --git a/desmume/src/cocoa/cocoa_output.h b/desmume/src/cocoa/cocoa_output.h
index d68250030..c108b5b3c 100644
--- a/desmume/src/cocoa/cocoa_output.h
+++ b/desmume/src/cocoa/cocoa_output.h
@@ -1,6 +1,6 @@
/*
Copyright (C) 2011 Roger Manuel
- Copyright (C) 2011-2013 DeSmuME team
+ Copyright (C) 2011-2014 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/desmume/src/cocoa/cocoa_output.mm b/desmume/src/cocoa/cocoa_output.mm
index c9663e34a..bf60059c8 100644
--- a/desmume/src/cocoa/cocoa_output.mm
+++ b/desmume/src/cocoa/cocoa_output.mm
@@ -1,6 +1,6 @@
/*
Copyright (C) 2011 Roger Manuel
- Copyright (C) 2011-2013 DeSmuME team
+ Copyright (C) 2011-2014 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -971,30 +971,7 @@
const float gapScalar = *(float *)[displayGapScalarData bytes];
[(id)delegate doDisplayGapChanged:gapScalar];
}
-/*
-- (void) handleChangeBilinearOutput:(NSData *)bilinearStateData
-{
- if (delegate == nil || ![delegate respondsToSelector:@selector(doBilinearOutputChanged:)])
- {
- return;
- }
-
- const BOOL theState = *(BOOL *)[bilinearStateData bytes];
- [(id)delegate doBilinearOutputChanged:theState];
- [self handleEmuFrameProcessed:self.frameData attributes:self.frameAttributesData];
-}
-- (void) handleChangeVerticalSync:(NSData *)verticalSyncStateData
-{
- if (delegate == nil || ![delegate respondsToSelector:@selector(doVerticalSyncChanged:)])
- {
- return;
- }
-
- const BOOL theState = *(BOOL *)[verticalSyncStateData bytes];
- [(id)delegate doVerticalSyncChanged:theState];
-}
-*/
- (void) handleChangeVideoFilter:(NSData *)videoFilterTypeIdData
{
if (delegate == nil || ![delegate respondsToSelector:@selector(doVideoFilterChanged:)])
diff --git a/desmume/src/cocoa/translations/English.lproj/MainMenu.strings b/desmume/src/cocoa/translations/English.lproj/MainMenu.strings
index f7d8c2cef..eef8ecd1c 100644
Binary files a/desmume/src/cocoa/translations/English.lproj/MainMenu.strings and b/desmume/src/cocoa/translations/English.lproj/MainMenu.strings differ
diff --git a/desmume/src/cocoa/translations/English.lproj/MainMenu.xib b/desmume/src/cocoa/translations/English.lproj/MainMenu.xib
index 0634cdaa1..48eceb2b1 100644
--- a/desmume/src/cocoa/translations/English.lproj/MainMenu.xib
+++ b/desmume/src/cocoa/translations/English.lproj/MainMenu.xib
@@ -12,6 +12,7 @@
-
+
268
YES
@@ -3783,7 +3786,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA
1
-
+
256
YES
@@ -5049,7 +5052,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
{{10, 33}, {443, 355}}
-
Display Views
@@ -5163,6 +5165,50 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
18
+
+
+
+
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBcAAAweAAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
ToolTip
@@ -54522,26 +54816,44 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABDOQAAwgAAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBcAAAwegAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ AUGIAABDhzSAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- {{343, 119}, {301, 560}}
+ {{42, 72}, {301, 586}}
com.apple.InterfaceBuilder.CocoaPlugin
- {{343, 119}, {301, 560}}
+ {{42, 72}, {301, 586}}
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABCkgAAwgwAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ AUKAAABCvAAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBcAAAwfAAAA
+
ToolTip
@@ -54551,6 +54863,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABDVwAAwgQAAA
+
ToolTip
@@ -54560,6 +54875,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBgAAAwsQAAA
+
ToolTip
@@ -54569,6 +54887,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBgAAAwpwAAA
+
ToolTip
@@ -54578,6 +54899,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBgAAAwmgAAA
+
ToolTip
@@ -54587,6 +54911,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBgAAAweAAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -54598,6 +54925,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBkAAAwowAAA
+
ToolTip
@@ -54626,6 +54956,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABDTwAAw6sAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -54647,8 +54980,14 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABCFAAAw6mAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ AUGIAABCJAAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
ToolTip
@@ -54688,6 +55027,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ AUGIAABD8AAAA
+
ToolTip
@@ -54697,6 +55039,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBcAAAwu4AAA
+
com.apple.InterfaceBuilder.CocoaPlugin
ToolTip
@@ -54707,6 +55052,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABDQwAAwgAAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -54746,8 +55094,14 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABCFAAAwegAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ AUKAAABDgwAAA
+
ToolTip
@@ -54757,6 +55111,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBgAAAwpoAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
{{884, 773}, {132, 63}}
@@ -55460,7 +55817,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- {{655, 783}, {196, 53}}
+ {{864, 783}, {196, 53}}
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -55529,7 +55886,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- {{884, 713}, {178, 43}}
+ {{1129, 713}, {178, 43}}
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -55708,6 +56065,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ AUGIAABDNwAAA
+
ToolTip
@@ -55719,6 +56079,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ AUKAAABCEAAAA
+
ToolTip
@@ -56142,7 +56505,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- {{884, 603}, {118, 133}}
+ {{973, 602}, {118, 133}}
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -56445,13 +56808,19 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ AUNnAABBIAAAA
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ AUOKAABBIAAAA
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- {{920, 173}, {239, 543}}
+ {{973, 172}, {239, 543}}
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -57156,6 +57525,36 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
+ ToolTip
+
+ ToolTip
+
+ When set, fragment colors will be sampled using an alternate algorithm. This may fix certain graphical glitches, such as the text in some Atlus games like Etrian Odyssey III.
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBqAAAwpAAAA
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ ToolTip
+
+ ToolTip
+
+ When set, fragment colors will be sampled using an alternate algorithm. This may fix certain graphical glitches, such as the text in some Atlus games like Etrian Odyssey III.
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ P4AAAL+AAABBoAAAwuLSAA
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -57223,7 +57622,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
- 9143
+ 9183
diff --git a/desmume/src/cocoa/userinterface/DisplayWindowController.mm b/desmume/src/cocoa/userinterface/DisplayWindowController.mm
index 2a6eacf0b..066a47edc 100644
--- a/desmume/src/cocoa/userinterface/DisplayWindowController.mm
+++ b/desmume/src/cocoa/userinterface/DisplayWindowController.mm
@@ -1081,8 +1081,6 @@ static std::tr1::unordered_map _screenMap
// Set the video filter source size now since the proper size is needed on initialization.
// If we don't do this, new windows could draw incorrectly.
- //const NSSize vfSrcSize = NSMakeSize(GPU_DISPLAY_WIDTH, ([self displayMode] == DS_DISPLAY_TYPE_DUAL) ? GPU_DISPLAY_HEIGHT * 2 : GPU_DISPLAY_HEIGHT);
- //[[cdsVideoOutput vf] setSourceSize:vfSrcSize];
[CocoaDSUtil messageSendOneWayWithInteger:[cdsVideoOutput receivePort] msgID:MESSAGE_CHANGE_VIDEO_FILTER integerValue:[self videoFilterType]];
// Add the video thread to the output list.
@@ -1785,7 +1783,7 @@ static std::tr1::unordered_map _screenMap
{
CGLLockContext(cglDisplayContext);
CGLSetCurrentContext(cglDisplayContext);
- oglv->RespondToVideoFilterChangeOGL((const VideoFilterTypeID)videoFilterTypeID);
+ oglv->SetVideoFilterOGL((const VideoFilterTypeID)videoFilterTypeID);
CGLUnlockContext(cglDisplayContext);
}
diff --git a/desmume/src/cocoa/userinterface/EmuControllerDelegate.h b/desmume/src/cocoa/userinterface/EmuControllerDelegate.h
index 03127bf23..fb85ee922 100644
--- a/desmume/src/cocoa/userinterface/EmuControllerDelegate.h
+++ b/desmume/src/cocoa/userinterface/EmuControllerDelegate.h
@@ -139,16 +139,6 @@ class AudioSampleBlockGenerator;
@property (assign) NSInteger frameJumpFramesForward;
@property (assign) NSInteger frameJumpToFrame;
-@property (assign) NSInteger render3DRenderingEngine;
-@property (assign) BOOL render3DHighPrecisionColorInterpolation;
-@property (assign) BOOL render3DEdgeMarking;
-@property (assign) BOOL render3DFog;
-@property (assign) BOOL render3DTextures;
-@property (assign) NSInteger render3DDepthComparisonThreshold;
-@property (assign) NSInteger render3DThreads;
-@property (assign) BOOL render3DLineHack;
-@property (assign) BOOL render3DMultisample;
-
@property (retain) DisplayWindowController *mainWindow;
@property (readonly) NSMutableArray *windowList;
diff --git a/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm b/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm
index f4803e147..62954cccb 100644
--- a/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm
+++ b/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm
@@ -85,16 +85,6 @@
@synthesize frameJumpFramesForward;
@synthesize frameJumpToFrame;
-@dynamic render3DRenderingEngine;
-@dynamic render3DHighPrecisionColorInterpolation;
-@dynamic render3DEdgeMarking;
-@dynamic render3DFog;
-@dynamic render3DTextures;
-@dynamic render3DDepthComparisonThreshold;
-@dynamic render3DThreads;
-@dynamic render3DLineHack;
-@dynamic render3DMultisample;
-
@synthesize mainWindow;
@synthesize windowList;
@@ -318,124 +308,6 @@
return currentVolumeValue;
}
-- (void) setRender3DRenderingEngine:(NSInteger)engineID
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- [cdsCore.cdsGPU setRender3DRenderingEngine:engineID];
-}
-
-- (NSInteger) render3DRenderingEngine
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- return [cdsCore.cdsGPU render3DRenderingEngine];
-}
-
-- (void) setRender3DHighPrecisionColorInterpolation:(BOOL)theState
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- [cdsCore.cdsGPU setRender3DHighPrecisionColorInterpolation:theState];
-}
-
-- (BOOL) render3DHighPrecisionColorInterpolation
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- return [cdsCore.cdsGPU render3DHighPrecisionColorInterpolation];
-}
-
-- (void) setRender3DEdgeMarking:(BOOL)theState
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- [cdsCore.cdsGPU setRender3DEdgeMarking:theState];
-}
-
-- (BOOL) render3DEdgeMarking
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- return [cdsCore.cdsGPU render3DEdgeMarking];
-}
-
-- (void) setRender3DFog:(BOOL)theState
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- [cdsCore.cdsGPU setRender3DFog:theState];
-}
-
-- (BOOL) render3DFog
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- return [cdsCore.cdsGPU render3DFog];
-}
-
-- (void) setRender3DTextures:(BOOL)theState
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- [cdsCore.cdsGPU setRender3DTextures:theState];
-}
-
-- (BOOL) render3DTextures
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- return [cdsCore.cdsGPU render3DTextures];
-}
-
-- (void) setRender3DDepthComparisonThreshold:(NSInteger)threshold
-{
- if (threshold < 0)
- {
- return;
- }
-
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- [cdsCore.cdsGPU setRender3DDepthComparisonThreshold:(NSUInteger)threshold];
-}
-
-- (NSInteger) render3DDepthComparisonThreshold
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- return [cdsCore.cdsGPU render3DDepthComparisonThreshold];
-}
-
-- (void) setRender3DThreads:(NSInteger)threadCount
-{
- if (threadCount < 0)
- {
- return;
- }
-
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- [cdsCore.cdsGPU setRender3DThreads:(NSUInteger)threadCount];
-}
-
-- (NSInteger) render3DThreads
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- return [cdsCore.cdsGPU render3DThreads];
-}
-
-- (void) setRender3DLineHack:(BOOL)theState
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- [cdsCore.cdsGPU setRender3DLineHack:theState];
-}
-
-- (BOOL) render3DLineHack
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- return [cdsCore.cdsGPU render3DLineHack];
-}
-
-- (void) setRender3DMultisample:(BOOL)theState
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- [cdsCore.cdsGPU setRender3DMultisample:theState];
-}
-
-- (BOOL) render3DMultisample
-{
- CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
- return [cdsCore.cdsGPU render3DMultisample];
-}
-
#pragma mark IBActions
- (IBAction) newDisplayWindow:(id)sender
@@ -1019,15 +891,16 @@
// Force end of editing of any text fields.
[[(NSControl *)sender window] makeFirstResponder:nil];
- [[NSUserDefaults standardUserDefaults] setInteger:[cdsCore.cdsGPU render3DRenderingEngine] forKey:@"Render3D_RenderingEngine"];
- [[NSUserDefaults standardUserDefaults] setBool:[cdsCore.cdsGPU render3DHighPrecisionColorInterpolation] forKey:@"Render3D_HighPrecisionColorInterpolation"];
- [[NSUserDefaults standardUserDefaults] setBool:[cdsCore.cdsGPU render3DEdgeMarking] forKey:@"Render3D_EdgeMarking"];
- [[NSUserDefaults standardUserDefaults] setBool:[cdsCore.cdsGPU render3DFog] forKey:@"Render3D_Fog"];
- [[NSUserDefaults standardUserDefaults] setBool:[cdsCore.cdsGPU render3DTextures] forKey:@"Render3D_Textures"];
- [[NSUserDefaults standardUserDefaults] setInteger:[cdsCore.cdsGPU render3DDepthComparisonThreshold] forKey:@"Render3D_DepthComparisonThreshold"];
- [[NSUserDefaults standardUserDefaults] setInteger:[cdsCore.cdsGPU render3DThreads] forKey:@"Render3D_Threads"];
- [[NSUserDefaults standardUserDefaults] setBool:[cdsCore.cdsGPU render3DLineHack] forKey:@"Render3D_LineHack"];
- [[NSUserDefaults standardUserDefaults] setBool:[cdsCore.cdsGPU render3DMultisample] forKey:@"Render3D_Multisample"];
+ [[NSUserDefaults standardUserDefaults] setInteger:[[cdsCore cdsGPU] render3DRenderingEngine] forKey:@"Render3D_RenderingEngine"];
+ [[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DHighPrecisionColorInterpolation] forKey:@"Render3D_HighPrecisionColorInterpolation"];
+ [[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DEdgeMarking] forKey:@"Render3D_EdgeMarking"];
+ [[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DFog] forKey:@"Render3D_Fog"];
+ [[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DTextures] forKey:@"Render3D_Textures"];
+ [[NSUserDefaults standardUserDefaults] setInteger:[[cdsCore cdsGPU] render3DDepthComparisonThreshold] forKey:@"Render3D_DepthComparisonThreshold"];
+ [[NSUserDefaults standardUserDefaults] setInteger:[[cdsCore cdsGPU] render3DThreads] forKey:@"Render3D_Threads"];
+ [[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DLineHack] forKey:@"Render3D_LineHack"];
+ [[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DMultisample] forKey:@"Render3D_Multisample"];
+ [[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DFragmentSamplingHack] forKey:@"Render3D_FragmentSamplingHack"];
}
- (IBAction) writeDefaultsEmulationSettings:(id)sender
@@ -2177,15 +2050,17 @@
[[self cdsSpeaker] setSpuSyncMethod:[[NSUserDefaults standardUserDefaults] integerForKey:@"SPU_SyncMethod"]];
// Set the 3D rendering options per user preferences.
- [self setRender3DThreads:(NSUInteger)[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_Threads"]];
- [self setRender3DRenderingEngine:[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_RenderingEngine"]];
- [self setRender3DHighPrecisionColorInterpolation:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_HighPrecisionColorInterpolation"]];
- [self setRender3DEdgeMarking:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_EdgeMarking"]];
- [self setRender3DFog:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_Fog"]];
- [self setRender3DTextures:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_Textures"]];
- [self setRender3DDepthComparisonThreshold:(NSUInteger)[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_DepthComparisonThreshold"]];
- [self setRender3DLineHack:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_LineHack"]];
- [self setRender3DMultisample:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_Multisample"]];
+ CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
+ [[cdsCore cdsGPU] setRender3DThreads:(NSUInteger)[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_Threads"]];
+ [[cdsCore cdsGPU] setRender3DRenderingEngine:[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_RenderingEngine"]];
+ [[cdsCore cdsGPU] setRender3DHighPrecisionColorInterpolation:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_HighPrecisionColorInterpolation"]];
+ [[cdsCore cdsGPU] setRender3DEdgeMarking:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_EdgeMarking"]];
+ [[cdsCore cdsGPU] setRender3DFog:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_Fog"]];
+ [[cdsCore cdsGPU] setRender3DTextures:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_Textures"]];
+ [[cdsCore cdsGPU] setRender3DDepthComparisonThreshold:(NSUInteger)[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_DepthComparisonThreshold"]];
+ [[cdsCore cdsGPU] setRender3DLineHack:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_LineHack"]];
+ [[cdsCore cdsGPU] setRender3DMultisample:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_Multisample"]];
+ [[cdsCore cdsGPU] setRender3DFragmentSamplingHack:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_FragmentSamplingHack"]];
}
#pragma mark NSUserInterfaceValidations Protocol
@@ -2466,7 +2341,8 @@
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
{
- [self setRender3DDepthComparisonThreshold:[(NSNumber *)[aNotification object] integerValue]];
+ CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
+ [[cdsCore cdsGPU] setRender3DDepthComparisonThreshold:[(NSNumber *)[aNotification object] integerValue]];
}
@end