mingw doesn't ship this header, so to make it compatible we have
to create the uuid symbols, otherwise we get the following link
errors:
sndxa2.o:sndxa2.cpp:(.text+0x35f): undefined reference to `_GUID const& __mingw_uuidof<IXAudio2>()'
sndxa2.o:sndxa2.cpp:(.text+0x366): undefined reference to `_GUID const& __mingw_uuidof<XAudio2>()'
otherwise we get link errors like:
snddx.o:snddx.cpp:(.text+0x556): undefined reference to `DXGetErrorDescription8A(long)@4'
snddx.o:snddx.cpp:(.text+0x563): undefined reference to `DXGetErrorString8A(long)@4'
this also gets rid of the previous workaround.
../../ROMReader.cpp: In function 'void* STDROMReaderInit(const char*)':
../../ROMReader.cpp:31:36: error: cannot convert 'stat*' to '_stat32*' for argument '2' to 'int _stat32(const char*, _stat32*)'
#define stat(...) _stat(__VA_ARGS__)
^
mingw's windres chokes on backslashed path names, a CI run will show
whether MSVC's rc builder can deal with forward slashes, but typically
windows tools support both styles.
File_Extractor/unrar/strfn.cpp: In function 'wchar etoupperw(wchar)':
File_Extractor/unrar/strfn.cpp:135:21: error: 'toupperw' was not declared in this scope
return(toupperw(ch));
^
File_Extractor/unrar/strfn.cpp: In function 'int wcsicompc(const wchar*, const wchar*)':
File_Extractor/unrar/strfn.cpp:240:28: error: 'wcsicomp' was not declared in this scope
return wcsicomp(Str1,Str2);
^
directx/xma2defs.h:406:5: error: '__out' has not been declared
note that we have to undef the macros on leaving the header,
as these names are also used for some arguments in stdlibc++
headers.
this apparently is an extension of MSVC, and gcc disallows it.
replay.cpp: In function 'INT_PTR RecordDialogProc(HWND, UINT, WPARAM, LPARAM)':
replay.cpp:285:4: error: anonymous struct not inside named type
};
^
In file included from /opt/mingw-w64/libexec/i686-w64-mingw32/include/minwindef.h:163:0,
from /opt/mingw-w64/libexec/i686-w64-mingw32/include/windef.h:,
from /opt/mingw-w64/libexec/i686-w64-mingw32/include/windows.h:69,
from replay.cpp:20:
replay.cpp:286:16: error: 'rtcMin' was not declared in this scope
ZeroMemory(&rtcMin, sizeof(SYSTEMTIME));
^
replay.cpp:287:16: error: 'rtcMax' was not declared in this scope
ZeroMemory(&rtcMax, sizeof(SYSTEMTIME));
^
the undef leads to the __stdcall attribute being stripped from all
functions, which in turn causes the symbols to not be found at link
time, as stdcall symbols have different name mangling.
mingw only supports the one-argument form of old windows.
fsnitroView.cpp: In function 'BOOL ViewFSNitroProc(HWND, UINT, WPARAM, LPARAM)':
fsnitroView.cpp:285:31: error: too many arguments to function 'int mkdir(const char*)'
mkdir(tmp.c_str(),0777);
^
In file included from CWindow.cpp:19:0:
CWindow.h:288:33: error: invalid pure specifier (only '= 0' is allowed) before ' token
virtual DWORD ThreadFunc()=NULL;
^
- Not only does this clean up the headers and (marginally) improve compile times, it also gets rid of any C++11 requirements.
- Update the copyright template in metaspu.cpp to match that of metaspu.h.
- Also silence a few compiler warnings here and there.
The casts through union were undefined behaviour (memcpy() should be
used instead), but they were unused so nothing bad happened.
_min() and _max() could be replaced with std::min() and std::max(),
whereas maxValue() could be replaced with std::numeric_limits<T>::max().
Once we migrate to C++20, bitCount() could also be replaced with
std::popcount() from <bits>.
- While this results in a 20% performance loss for video display window functions (like video filters), this also dramatically extends battery life. To return to the old way of using the discrete GPU for video display windows, the user must disable Automatic Graphics Switching in their System Preferences.
- The Troubleshooting Window now correctly reports the emulated 3D renderer that is currently active, rather than the one that is selected in the GUI.
- Also fix a bug where creating a OpenGL 3D renderer's context would immediately fall back to Apple Software Renderer if context creation failed. Now, context creation falls back to Apple Software Renderer as the last resort, only after all other Core Profile contexts have failed.