Check OpenExternalWebBrowser custom flag better (#674)
Properly check string prefix to see if we should open it in browser
This commit is contained in:
parent
ec5dc504bf
commit
026adbebe5
|
@ -9,7 +9,8 @@ void, __fastcall, (char* pUrl, char flags))
|
|||
// clang-format on
|
||||
{
|
||||
bool bIsOriginOverlayEnabledOriginal = *bIsOriginOverlayEnabled;
|
||||
if (flags & 2 && !strncmp(pUrl, "http", 4)) // custom force external browser flag
|
||||
bool isHttp = !strncmp(pUrl, "http://", 7) || !strncmp(pUrl, "https://", 8);
|
||||
if (flags & 2 && isHttp) // custom force external browser flag
|
||||
*bIsOriginOverlayEnabled = false; // if this bool is false, game will use an external browser rather than the origin overlay one
|
||||
|
||||
OpenExternalWebBrowser(pUrl, flags);
|
||||
|
|
Loading…
Reference in New Issue