src/video/emscripten/SDL_emscriptenvideo.c


Log

Author Commit Date CI Message
Sam Lantinga b8d85c69 2022-11-30T12:51:59 Update for SDL3 coding style (#6717) I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base. In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted. The script I ran for the src directory is added as build-scripts/clang-format-src.sh This fixes: #6592 #6593 #6594 (cherry picked from commit 5750bcb174300011b91d1de20edb288fcca70f8c)
Sylvain Becker fb0ce375 2022-11-27T17:38:43 Cleanup add brace (#6545) * Add braces after if conditions * More add braces after if conditions * Add braces after while() conditions * Fix compilation because of macro being modified * Add braces to for loop * Add braces after if/goto * Move comments up * Remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements after merge * Fix inconsistent patterns are xxx == NULL vs !xxx * More "{}" for "if() break;" and "if() continue;" * More "{}" after if() short statement * More "{}" after "if () return;" statement * More fix inconsistent patterns are xxx == NULL vs !xxx * Revert some modificaion on SDL_RLEaccel.c * SDL_RLEaccel: no short statement * Cleanup 'if' where the bracket is in a new line * Cleanup 'while' where the bracket is in a new line * Cleanup 'for' where the bracket is in a new line * Cleanup 'else' where the bracket is in a new line (cherry picked from commit 6a2200823c66e53bd3cda4a25f0206b834392652 to reduce conflicts merging between SDL2 and SDL3)
Noel Berry 00452e47 2022-08-24T11:25:13 Adding SDL_GetWindowSizeInPixels for window size in pixels (#6112)
Ryan C. Gordon 20a76b0e 2022-07-25T23:06:58 video: removed unused devindex argument from bootstrap's create method.
Ryan C. Gordon ea7d5307 2022-03-31T14:11:52 emscripten: Proxy SDL_GetUsableDisplayBounds to the main thread.
Mahyar Koshkouei 41e7d1ba 2022-03-06T23:02:57 Add SDL_GetDisplayDPI implementation on Emscripten Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Joseph Kogut 55af8dca 2019-02-27T14:16:37 emscripten: use emscripten_set_window_title api
Joseph Kogut d8baad7e 2019-02-27T14:15:40 emscripten: use emscripten_get_screen_size api
Cameron Gutman a0d3c6c6 2021-01-25T21:42:14 Rename SetWindowGrab() to SetWindowMouseGrab()
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
M Stoeckl 052a1373 2020-07-12T19:11:15 Merge VideoBootStrap::available into VideoBootStrap::create The two are only ever called together, and combining them makes it possible to eliminate redundant symbol loading and redundant attempts to connect to a display server.
Ryan C. Gordon daf360e0 2020-05-13T16:48:42 emscripten: Fix crash in SDL_SetWindowTitle(). This patch came from emscripten-ports, thanks! Fixes Bugzilla #5133.
Daid 287772f5 2020-04-09T15:01:45 emscripten: Let SDL_GetDisplayUsableBounds return the size of the window This does not account for scrollbars nor margins. But is much better then returning the full display size when not running fullscreen, but for example in an iframe.
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Charlie Birks 60c48ed7 2019-05-09T12:09:34 Emscripten: Store canvas id in WindowData Also replace all hardcoded uses of "#canvas" or NULL
Charlie Birks 04b1494c 2019-01-29T12:19:23 Emscripten: resize canvas to 0x0 in DestroyWindow Closest we can get to actually destroying it
Charlie Birks d60546aa 2019-01-29T12:19:06 Emscripten: don't zero the display mode before adding it
Charlie Birks 4a2888af 2019-01-29T12:19:03 Emscripten: use UTF8ToString instead of Pointer_stringify
Charlie Birks 8dab9c95 2019-01-29T12:18:56 Emscripten: Use set_canvas_element_size This will be needed for supporting multiple canvases and set_canvas_size is deprecated anyway.
Charlie Birks 1767d091 2019-01-29T12:14:41 Emscripten: use a fake size for external sizing check The check would fail if the canvas happened to be the correct size already. (#66, mentioned in #58)
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga 50efbda7 2017-08-28T00:43:14 Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h
Philipp Wiesemann 711df8a9 2017-08-05T22:10:48 emscripten: Fixed compiling without OpenGL support.
Charlie Birks 613955b4 2017-02-17T10:13:07 Emscripten: only update pixel ratio if HiDPI is enabled
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Csongor Szabo 01f62736 2016-10-14T17:06:28 emscripten: check if device pixel ratio has changed
Alon Zakai bec55734 2016-09-13T00:03:58 add some detail to fullscreen workaround comment; version 6 Conflicts: version.txt
Charlie Birks 405d64b2 2016-09-13T00:03:56 only unset fullscreen flags if fullscreen failed
Charlie Birks c68cac89 2016-09-13T00:03:55 use screen resolution instead of canvas size
Boris Gjenero 791b946a 2016-09-13T00:03:54 Fix full screen mode in Firefox, which was broken by 9d4beb2
Boris Gjenero b71208d4 2016-09-13T00:03:53 Support SDL_SetWindowTitle() via Module['setWindowTitle']()
Sam Lantinga bdca510f 2016-09-13T00:03:28 simplify fullscreen handling using new fullscreen_strategy api, patch contributed by Charlie Birks
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
Ryan C. Gordon 16f3cbfc 2014-12-26T23:16:54 Cleaned up some compiler warnings.
Philipp Wiesemann 22855927 2014-12-25T22:08:48 Removed unnecessary call to SDL_free().
Ryan C. Gordon fe40a172 2014-12-18T00:19:52 Initial merge of Emscripten port! With this commit, you can compile SDL2 with Emscripten ( http://emscripten.org/ ), and make your SDL-based C/C++ program into a web app. This port was due to the efforts of several people, including: Charlie Birks, Sathyanarayanan Gunasekaran, Jukka Jyl?nki, Alon Zakai, Edward Rudd, Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!)