Default to c99 for plugin buildbot

This commit is contained in:
UnknownShadow200 2020-03-08 11:59:08 +11:00
parent 7684b7a20a
commit a13ddad39d
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
cd $ROOT
echo $(pwd)
FILES=$(find . -type f -name "*.c" | tr '\n' ' ')
FLAGS="-shared -fPIC -O1 -s"
FLAGS="-shared -fPIC -O1 -s -std=c99"
NIX32_PATH="gcc -m32"
NIX64_PATH="gcc -m64"

View File

@ -2826,7 +2826,7 @@ static void RefreshWindowBounds(void) {
emscripten_get_canvas_element_size(NULL, &Window_Width, &Window_Height);
}
static void CorrectFocus(void) {
static void CorrectPointerFocus(void) {
/* Sometimes emscripten_request_pointerlock doesn't always acquire focus */
/* Browser also only allows pointer locks requests in response to user input */
EmscriptenPointerlockChangeEvent status;
@ -3035,6 +3035,7 @@ static EM_BOOL OnKey(int type, const EmscriptenKeyboardEvent* ev , void* data) {
}
static EM_BOOL OnKeyPress(int type, const EmscriptenKeyboardEvent* ev, void* data) {
char keyChar;
CorrectPointerFocus();
/* When on-screen keyboard is open, we don't want to intercept any key presses, */
/* because they should be sent to the HTML text input instead. */
@ -3046,7 +3047,6 @@ static EM_BOOL OnKeyPress(int type, const EmscriptenKeyboardEvent* ev, void* dat
/* have these intercepted key presses in its text buffer) */
if (keyboardOpen) return false;
char keyChar;
if (Convert_TryUnicodeToCP437(ev->charCode, &keyChar)) {
Event_RaiseInt(&InputEvents.Press, keyChar);
}
@ -3185,7 +3185,7 @@ cc_result Window_EnterFullscreen(void) {
strategy.canvasResolutionScaleMode = EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_HIDEF;
strategy.filteringMode = EMSCRIPTEN_FULLSCREEN_FILTERING_DEFAULT;
strategy.canvasResizedCallback = Window_CanvasResize;
strategy.canvasResizedCallback = OnCanvasResize;
strategy.canvasResizedCallbackUserData = NULL;
return emscripten_request_fullscreen_strategy("#canvas", 1, &strategy);
}