mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
More lenient emoji check, remove unused variable
This commit is contained in:
parent
83dbc60d86
commit
5533d5ec57
3 changed files with 7 additions and 7 deletions
|
@ -26,10 +26,11 @@ int u8_strlen(const char *s);
|
||||||
void u8_inc(const char *s, int *i);
|
void u8_inc(const char *s, int *i);
|
||||||
void u8_dec(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) {
|
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);
|
bool AnyEmojiInString(const char *s, size_t byteCount);
|
||||||
|
|
|
@ -181,8 +181,8 @@ private:
|
||||||
|
|
||||||
HWND hWnd_;
|
HWND hWnd_;
|
||||||
ID3D11Device *device_;
|
ID3D11Device *device_;
|
||||||
ID3D11DeviceContext *context_;
|
|
||||||
ID3D11Device1 *device1_;
|
ID3D11Device1 *device1_;
|
||||||
|
ID3D11DeviceContext *context_;
|
||||||
ID3D11DeviceContext1 *context1_;
|
ID3D11DeviceContext1 *context1_;
|
||||||
|
|
||||||
ID3D11Texture2D *bbRenderTargetTex_ = nullptr; // NOT OWNED
|
ID3D11Texture2D *bbRenderTargetTex_ = nullptr; // NOT OWNED
|
||||||
|
|
|
@ -183,7 +183,6 @@ bool D3D11Context::Init(HINSTANCE hInst, HWND wnd, std::string *error_message) {
|
||||||
// Obtain DXGI factory from device (since we used nullptr for pAdapter above)
|
// Obtain DXGI factory from device (since we used nullptr for pAdapter above)
|
||||||
IDXGIFactory1 *dxgiFactory = nullptr;
|
IDXGIFactory1 *dxgiFactory = nullptr;
|
||||||
IDXGIDevice *dxgiDevice = nullptr;
|
IDXGIDevice *dxgiDevice = nullptr;
|
||||||
IDXGIDevice1* dxgiDevice1 = nullptr;
|
|
||||||
IDXGIAdapter *adapter = nullptr;
|
IDXGIAdapter *adapter = nullptr;
|
||||||
hr = device_->QueryInterface(__uuidof(IDXGIDevice), reinterpret_cast<void**>(&dxgiDevice));
|
hr = device_->QueryInterface(__uuidof(IDXGIDevice), reinterpret_cast<void**>(&dxgiDevice));
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue