Turns out GetSystemWindowsDirectory doesn't exist in old mingw, but GetWindowsDirectory does. So use that instead.

This commit is contained in:
UnknownShadow200 2019-04-05 19:11:12 +11:00
parent b34c4da181
commit 024e756c5c
4 changed files with 14 additions and 7 deletions

View File

@ -740,7 +740,13 @@ static void Http_WorkerLoop(void) {
/*########################################################################################################################*
*----------------------------------------------------Http public api------------------------------------------------------*
*#########################################################################################################################*/
#ifdef CC_BUILD_WEB
/* Access to XMLHttpRequest at 'http://static.classicube.net' from origin 'http://www.classicube.net' has been blocked by CORS policy: */
/* No 'Access-Control-Allow-Origin' header is present on the requested resource. */
const static String skinServer = String_FromConst("http://classicube.net/static/skins/");
#else
const static String skinServer = String_FromConst("http://static.classicube.net/skins/");
#endif
void Http_AsyncGetSkin(const String* id, const String* skinName) {
String url; char urlBuffer[STRING_SIZE];

View File

@ -199,9 +199,6 @@ static bool InputHandler_HandleCoreKey(Key key) {
} else {
InputHandler_CycleDistanceForwards(viewDists, count);
}
} else if ((key == KEY_ESCAPE || key == KEY_PAUSE) && !active->HandlesAllInput) {
Gui_FreeActive();
Gui_SetActive(PauseScreen_MakeInstance());
} else if (key == KeyBinds[KEYBIND_INVENTORY] && active == Gui_HUD) {
Gui_FreeActive();
Gui_SetActive(InventoryScreen_MakeInstance());
@ -464,7 +461,12 @@ static void InputHandler_KeyDown(void* obj, int key, bool was) {
Window_Close(); return;
} else if (key == KeyBinds[KEYBIND_SCREENSHOT] && !was) {
Game_ScreenshotRequested = true; return;
} else if (Elem_HandlesKeyDown(active, key, was)) { return; }
} else if (Elem_HandlesKeyDown(active, key, was)) {
return;
} else if ((key == KEY_ESCAPE || key == KEY_PAUSE) && !active->HandlesAllInput) {
Gui_FreeActive();
Gui_SetActive(PauseScreen_MakeInstance()); return;
}
/* These should not be triggered multiple times when holding down */
if (was) return;

View File

@ -1249,7 +1249,7 @@ static void Font_Init(void) {
String dirs[1];
String_InitArray(dirs[0], winFolder);
UINT winLen = GetSystemWindowsDirectory(winTmp, FILENAME_SIZE);
UINT winLen = GetWindowsDirectory(winTmp, FILENAME_SIZE);
if (winLen) {
Platform_DecodeString(&dirs[0], winTmp, winLen);
} else {

View File

@ -2561,8 +2561,6 @@ static void Window_CorrectFocus(void) {
/* Browser also only allows pointer locks requests in response to user input */
EmscriptenPointerlockChangeEvent status;
status.isActive = false;
return;
emscripten_get_pointerlock_status(&status);
if (win_rawMouse && !status.isActive) Window_EnableRawMouse();
}
@ -2837,6 +2835,7 @@ void Window_Close(void) {
Window_DisableRawMouse();
Window_SetSize(0, 0);
Window_UnhookEvents();
Event_RaiseVoid(&WindowEvents.Destroyed);
}