Added vector unit detection
This commit is contained in:
parent
f9d2ca3785
commit
68413c07fb
|
@ -28,7 +28,7 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const char* OpenGLideVersion = "0.13a1";
|
||||
const char* OpenGLideVersion = "0.13a2";
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -88,6 +88,12 @@ OSErr InitMainVariables(void)
|
|||
{
|
||||
UserConfig.GlideTextureUnits = 3;
|
||||
}
|
||||
// Detect vector unit (Altivec, SSE, etc.)
|
||||
UserConfig.VectorUnitType = GetVectorUnitType();
|
||||
if (UserConfig.VectorUnitType > OpenGLideVectorUnitType_None)
|
||||
{
|
||||
GlideMsg("Using %s vector unit\n", OpenGLideVectorUnitNames[UserConfig.VectorUnitType - 1]);
|
||||
}
|
||||
// Apply mandatory application dependent settings/patches
|
||||
GlideApplication::Type application = s_GlideApplication.GetType();
|
||||
switch (application)
|
||||
|
|
|
@ -26,18 +26,21 @@ extern const char* OpenGLideVersion;
|
|||
// Product name of the library
|
||||
extern const char* OpenGLideProductName;
|
||||
|
||||
// extern double ClockFreq;
|
||||
extern GlideStruct Glide; // Glide Internal
|
||||
extern OpenGLStruct OpenGL; // OpenGL equivalents
|
||||
extern GlideSettingsImpl UserConfig;
|
||||
extern GlideSettingsImpl InternalConfig;
|
||||
|
||||
// Return the vector unit type (None, Altivec, SSE, etc.)
|
||||
extern OpenGLideVectorUnitType GetVectorUnitType();
|
||||
extern const char* OpenGLideVectorUnitNames[];
|
||||
|
||||
// GLide
|
||||
OSErr InitMainVariables();
|
||||
bool InitWindow( FxU32 hwnd );
|
||||
void InitOpenGL( void );
|
||||
bool ClearAndGenerateLogFile( void );
|
||||
void CloseLogFile( void );
|
||||
bool InitWindow(FxU32 hwnd);
|
||||
void InitOpenGL(void);
|
||||
bool ClearAndGenerateLogFile(void);
|
||||
void CloseLogFile(void);
|
||||
|
||||
// Memory management
|
||||
void* AllocFrameBuffer(long buffersize, long buffertypesize);
|
||||
|
|
|
@ -170,7 +170,7 @@ void GlideSettings::defaults()
|
|||
GapFixDepthFactor = 3.3f;
|
||||
|
||||
GenerateSubTextures = 0;
|
||||
Mipmapping = true;
|
||||
Mipmapping = true;
|
||||
AnisotropylLevel = 16;
|
||||
IgnorePaletteChange = false;
|
||||
ARB_multitexture = true;
|
||||
|
@ -207,6 +207,7 @@ void GlideSettings::defaults()
|
|||
ShamelessPlug = false;
|
||||
UseApplicationSpecificSettings = false;
|
||||
AutoEnableGameSpecificSettings = true;
|
||||
VectorUnitType = OpenGLideVectorUnitType_None;
|
||||
}
|
||||
|
||||
GlideSettings::IOErr GlideSettings::read_settings()
|
||||
|
|
|
@ -59,6 +59,12 @@ enum OpenGLideGapFixFlags
|
|||
OpenGLideGapFixFlag_VertexLengthSecondRadius = 0x80
|
||||
};
|
||||
|
||||
enum OpenGLideVectorUnitType
|
||||
{
|
||||
OpenGLideVectorUnitType_None = 0x00,
|
||||
OpenGLideVectorUnitType_Altivec = 0x01
|
||||
};
|
||||
|
||||
struct ConfigStruct
|
||||
{
|
||||
OpenGLideDisplayMode DisplayMode;
|
||||
|
@ -114,6 +120,7 @@ struct ConfigStruct
|
|||
bool ShamelessPlug;
|
||||
bool UseApplicationSpecificSettings;
|
||||
bool AutoEnableGameSpecificSettings;
|
||||
OpenGLideVectorUnitType VectorUnitType;
|
||||
};
|
||||
|
||||
class GlideSettings : public ConfigStruct
|
||||
|
|
Loading…
Reference in New Issue