diff --git a/Common/Data/Encoding/Utf8.h b/Common/Data/Encoding/Utf8.h index 60a88c9c50..5123ef8a4b 100644 --- a/Common/Data/Encoding/Utf8.h +++ b/Common/Data/Encoding/Utf8.h @@ -26,10 +26,11 @@ int u8_strlen(const char *s); void u8_inc(const char *s, int *i); void u8_dec(const char *s, int *i); -// ranges grabbed from https://stackoverflow.com/a/62898106, ignoring the two bogus ranges. -// there's probably more. Doesn't need to be perfect. inline bool CodepointIsProbablyEmoji(uint32_t c) { - return (c >= 127744 && c <= 129782) || (c >= 126980 && c <= 127569); + // Original check was some ranges grabbed from https://stackoverflow.com/a/62898106. + // But let's just go with checking if outside the BMP, it's not a big deal if we accidentally + // switch to color when not needed if someone uses a weird glyph. + return c > 0xFFFF; } bool AnyEmojiInString(const char *s, size_t byteCount); diff --git a/Common/GPU/D3D11/thin3d_d3d11.cpp b/Common/GPU/D3D11/thin3d_d3d11.cpp index 2e4057c2de..0248c44856 100644 --- a/Common/GPU/D3D11/thin3d_d3d11.cpp +++ b/Common/GPU/D3D11/thin3d_d3d11.cpp @@ -181,8 +181,8 @@ private: HWND hWnd_; ID3D11Device *device_; - ID3D11DeviceContext *context_; ID3D11Device1 *device1_; + ID3D11DeviceContext *context_; ID3D11DeviceContext1 *context1_; ID3D11Texture2D *bbRenderTargetTex_ = nullptr; // NOT OWNED diff --git a/Windows/GPU/D3D11Context.cpp b/Windows/GPU/D3D11Context.cpp index 97faabf8af..750755618b 100644 --- a/Windows/GPU/D3D11Context.cpp +++ b/Windows/GPU/D3D11Context.cpp @@ -181,10 +181,9 @@ bool D3D11Context::Init(HINSTANCE hInst, HWND wnd, std::string *error_message) { GetRes(hWnd_, width, height); // Obtain DXGI factory from device (since we used nullptr for pAdapter above) - IDXGIFactory1* dxgiFactory = nullptr; + IDXGIFactory1 *dxgiFactory = nullptr; IDXGIDevice *dxgiDevice = nullptr; - IDXGIDevice1* dxgiDevice1 = nullptr; - IDXGIAdapter* adapter = nullptr; + IDXGIAdapter *adapter = nullptr; hr = device_->QueryInterface(__uuidof(IDXGIDevice), reinterpret_cast(&dxgiDevice)); if (SUCCEEDED(hr)) { hr = dxgiDevice->GetAdapter(&adapter);