mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-24 04:26:55 -04:00
Allow all CPUs to run the game the best they can (#296)
This commit is contained in:
parent
81ba75ea65
commit
ea29aee6f6
@ -172,7 +172,6 @@ int LegoDeviceEnumerate::GetBestDevice()
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
int k = -1;
|
int k = -1;
|
||||||
bool cpu_mmx = SupportsSIMD();
|
|
||||||
|
|
||||||
for (list<MxDriver>::iterator it = m_list.begin(); it != m_list.end(); it++, i++) {
|
for (list<MxDriver>::iterator it = m_list.begin(); it != m_list.end(); it++, i++) {
|
||||||
|
|
||||||
@ -181,13 +180,8 @@ int LegoDeviceEnumerate::GetBestDevice()
|
|||||||
if ((*it2).m_HWDesc.dcmColorModel != D3DCOLOR_NONE) {
|
if ((*it2).m_HWDesc.dcmColorModel != D3DCOLOR_NONE) {
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
else {
|
else if ((*it2).m_HELDesc.dcmColorModel != D3DCOLOR_NONE && i == 0) {
|
||||||
if (cpu_mmx && (*it2).m_HELDesc.dcmColorModel == D3DCOLOR_RGB && i == 0) {
|
k = j;
|
||||||
k = j;
|
|
||||||
}
|
|
||||||
else if ((*it2).m_HELDesc.dcmColorModel == D3DCOLOR_MONO && i == 0 && k < 0) {
|
|
||||||
k = j;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
j++;
|
j++;
|
||||||
@ -197,14 +191,6 @@ int LegoDeviceEnumerate::GetBestDevice()
|
|||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x00402930
|
|
||||||
// FUNCTION: LEGO1 0x1009d1a0
|
|
||||||
// FUNCTION: BETA10 0x1011cf54
|
|
||||||
bool LegoDeviceEnumerate::SupportsSIMD()
|
|
||||||
{
|
|
||||||
return SDL_HasSSE2() || SDL_HasNEON() || SDL_HasMMX();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x004029a0
|
// FUNCTION: CONFIG 0x004029a0
|
||||||
// FUNCTION: LEGO1 0x1009d210
|
// FUNCTION: LEGO1 0x1009d210
|
||||||
// FUNCTION: BETA10 0x1011cfc4
|
// FUNCTION: BETA10 0x1011cfc4
|
||||||
|
@ -15,7 +15,6 @@ public:
|
|||||||
int FormatDeviceName(char* p_buffer, const MxDriver* p_ddInfo, const Direct3DDeviceInfo* p_d3dInfo) const;
|
int FormatDeviceName(char* p_buffer, const MxDriver* p_ddInfo, const Direct3DDeviceInfo* p_d3dInfo) const;
|
||||||
int BETA_1011cc65(int p_idx, char* p_buffer);
|
int BETA_1011cc65(int p_idx, char* p_buffer);
|
||||||
int GetBestDevice();
|
int GetBestDevice();
|
||||||
static bool SupportsSIMD();
|
|
||||||
int FUN_1009d210();
|
int FUN_1009d210();
|
||||||
unsigned char FUN_1009d3d0(Direct3DDeviceInfo& p_device);
|
unsigned char FUN_1009d3d0(Direct3DDeviceInfo& p_device);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user