Commit Graph

425 Commits

Author SHA1 Message Date
Philipp Wiesemann
df4cf79d42 directfb: Fixed compiler warnings about undefined functions. 2017-05-13 23:00:53 +02:00
Philipp Wiesemann
29222db7f6 emscripten: Fixed not removing pointer lock event callback. 2017-05-13 23:00:35 +02:00
Philipp Wiesemann
cc5b4f450a emscripten: Changed internal functions to be static. 2017-05-12 23:01:17 +02:00
Philipp Wiesemann
ce01128adf Fixed warnings about shadowed global variable.
Found by buildbot.
2017-05-12 23:01:04 +02:00
Philipp Wiesemann
87e0d812dd directfb: Removed duplicate comment. 2017-05-12 23:00:40 +02:00
Philipp Wiesemann
61c326e12b directfb: Fixed typo in log message. 2017-05-11 23:00:39 +02:00
Philipp Wiesemann
75c0d1ef6d directfb: Fixed compiler warnings about unused variables. 2017-05-11 23:00:21 +02:00
Sam Lantinga
8b7ae35356 Fixed build error on Linux 2017-05-09 03:19:58 -07:00
Sam Lantinga
9ac3bb7011 Added support for mixing Qt and SDL on iOS
You should call SDL_SetMainReady(), and then customize the QIOSApplicationDelegate like this, in your application code:

/* Additional support for applications mixing Qt and SDL */
@interface QIOSApplicationDelegate : UIResponder <UIApplicationDelegate>
@end

extern "C"
{
void SDL_OnApplicationWillResignActive();
void SDL_OnApplicationDidEnterBackground();
void SDL_OnApplicationWillEnterForeground();
void SDL_OnApplicationDidBecomeActive();
}

@interface QIOSApplicationDelegate (SDL)

- (void)applicationWillResignActive:(UIApplication*)application;
- (void)applicationDidEnterBackground:(UIApplication*)application;
- (void)applicationWillEnterForeground:(UIApplication*)application;
- (void)applicationDidBecomeActive:(UIApplication*)application;

@end

@implementation QIOSApplicationDelegate (SDL)

- (void)applicationWillResignActive:(UIApplication*)application
{
    SDL_OnApplicationWillResignActive();
}

- (void)applicationDidEnterBackground:(UIApplication*)application
{
    SDL_OnApplicationDidEnterBackground();
}

- (void)applicationWillEnterForeground:(UIApplication*)application
{
    SDL_OnApplicationWillEnterForeground();
}

- (void)applicationDidBecomeActive:(UIApplication*)application
{
    SDL_OnApplicationDidBecomeActive();
}

@end // QIOSApplicationDelegate
2017-05-09 10:10:42 -07:00
Philipp Wiesemann
b7b919078f haiku: Changed internal function to be static. 2017-05-07 21:02:31 +02:00
Philipp Wiesemann
3ed2f0ca10 haiku: Fixed unlocking clipboard twice. 2017-05-07 21:02:16 +02:00
Philipp Wiesemann
4466b93141 haiku: Fixed comment. 2017-05-06 21:46:11 +02:00
Philipp Wiesemann
34747107fe mir: Fixed memory leak if system cursor id is unknown. 2017-05-06 21:46:00 +02:00
Philipp Wiesemann
34d9c5213c emscripten: Fixed return type in event callback declaration. 2017-05-06 21:45:43 +02:00
Ryan C. Gordon
ce2998b8b9 cocoa: Don't crash on messagebox keypress without a successful SDL_Init(). 2017-05-02 21:46:28 -04:00
Ryan C. Gordon
619ab7a22d haiku: Various fixes from haikuports.
Based on patch here:

https://github.com/haikuports/haikuports/blob/master/media-libs/libsdl2/patches/libsdl2-2.0.5.patchset
2017-05-01 18:39:05 -04:00
Philipp Wiesemann
444c47a1b8 windows: Changed six internal functions to be static. 2017-04-29 22:50:35 +02:00
Joshua Granick
1286a7d23e windows: Add SDL_WINDOW_ALWAYS_ON_TOP support. 2017-04-20 21:31:44 -04:00
Ryan C. Gordon
93a6191cdc emscripten: keep track of pointer lock losses and maybe regrab pointer later.
If an Emscripten app is in relative mouse mode and the user presses Escape
(or whatever is appropriate), then the pointer lock is broken by the browser.

This keeps track of those losses, and next time the user presses a mouse
button down on the canvas, if the app is still meant to be in relative mouse
mode, we will attempt to regrab the pointer.

This makes it much more seamless for things like first-person shooters, and
the app doesn't need any manual intervention.
2017-04-20 13:00:54 -04:00
Philipp Wiesemann
2bf79c2e0e mir: Fixed typo in error messages. 2017-04-09 23:00:54 +02:00
Drew Bliss
a4dbf56574 Fix divide-by-zero when videodata->ime_candpgsize is zero. We're seeing this happen in Dota in the wild. 2017-04-06 13:27:51 -07:00
Drew Bliss
66555f6115 SDL - attempt to fix https://github.com/ValveSoftware/Dota-2/issues/1199 of mouse not locking in Dota. This fix is proposed by Ryan Gordon (increase timeout in X11_SetWindowGrab from 250ms to 5000ms). I'm going to integrate to source2 and ship it to dota customers. If it works, SamL will upsteam it to SDL. 2017-04-06 13:27:48 -07:00
Sam Lantinga
5789da67cf Fixed bug 1859 - No SDL_VIDEORESIZE event generated when the window manager sets the window size.
Samuel Hopkins

Just confirming that the patch from Andreas (attachment 1715 [details]) works for me under SDL 2.0.3 with xmonad.

Stas Sergeev

Confirming that the patch in this ticket fixes the full-screen switching for dosemu2 on ubuntu-16.04. Note that I am not using xmonad, so this bug appears to be generic.
2017-04-03 13:32:53 -07:00
Philipp Wiesemann
1517ba7285 PSP: Fixed error messages. 2017-04-02 21:33:54 +02:00
Philipp Wiesemann
f96cdca4e7 Mir: Changed two internal functions to be static. 2017-04-02 21:33:42 +02:00
Philipp Wiesemann
266816b4aa Removed newlines from error messages. 2017-03-26 21:00:19 +02:00
Brandon Schaefer
c35f46d03c mir: Set the max/min w/h vs just setting the window w/h 2017-03-18 13:57:57 -07:00
Sam Lantinga
22161480ee Compile fix for android.
"ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]"

Moving some variable declarations to the top of Android_SetScreenResolution()
2017-03-14 07:22:08 -07:00
Philipp Wiesemann
72fdf62980 Mir: Fixed crash if creating default cursor failed.
Found by Cppcheck.
2017-03-04 23:05:32 +01:00
Ryan C. Gordon
6aa17426a6 video: Don't compile isAtLeastGL3() if we don't have OpenGL support _at all_. 2017-03-03 16:38:45 -05:00
Ryan C. Gordon
ca0bf151d5 Fix some more compiler warnings on armcc. 2017-03-03 16:38:17 -05:00
Ryan C. Gordon
d526b8a1e9 Some patches to make SDL compile with armcc (ARM's C compiler). 2017-03-02 13:33:04 -05:00
Brandon Schaefer
94a69443c7 mistake: Revert the files that I did not mean to commit 2017-03-01 15:05:54 -08:00
Brandon Schaefer
7bbb13ea59 * Some refactoring and bug fixes. Thanks Micha? Kuchta! 2017-03-01 14:50:59 -08:00
Ryan C. Gordon
bc8778854e raspberrypi: RPI_Destroy() should free the SDL_VideoDevice and its driverdata. 2017-02-28 19:48:52 -05:00
Brandon Schaefer
5a47ee0365 mir: Get ready for Mir 1.0, clean up deprecations. Thanks Micha? Kuchta! 2017-02-27 12:20:16 -08:00
Philipp Wiesemann
e5d9b25d8c Fixed comment style. 2017-02-26 21:20:39 +01:00
Ryan C. Gordon
07519a6b95 Removed a bunch of unnecessary #ifdefs. 2017-02-26 00:40:04 -05:00
Charlie Birks
0d647d35b0 Emscripten: implement custom cursors 2017-02-17 10:13:17 +00:00
Charlie Birks
33bddcfda2 Emscripten: refactor cursor handling 2017-02-17 10:13:12 +00:00
Charlie Birks
613955b4f2 Emscripten: only update pixel ratio if HiDPI is enabled 2017-02-17 10:13:07 +00:00
Ryan C. Gordon
70c0400b12 windows: Try to unify all the GUID comparison code into a core helper function.
There are likely several more I missed.
2017-02-13 17:00:46 -05:00
Sam Lantinga
cf31ea1478 Fixed bug 3583 - X11 touch device can be permanently lost
Volumetric

In X11 the SDL error "Unknown touch device" can occur after which the application stops recognizing touch events. For a kiosk-type application this results in a hang as far as the user is concerned. This is reproducible on HP Z220/Z230/Z240 workstations by swapping USB cables for a while and it also occurs with no physical changes, probably due to USB device power management. A workaround is to make SDL re-enumerate the touch devices like it does at startup. A patch is attached.
2017-02-11 11:14:48 -08:00
Sam Lantinga
9171f71dbe Fixed warning in Android build 2017-02-10 09:41:16 -08:00
Sam Lantinga
da30992d47 Fixed bug 3577 - Can't set minimal size (message box appears instead) if maximal size wasn't declared (i.e. unlimited) 2017-02-02 00:41:58 -08:00
Sam Lantinga
52e9c42df9 Fixed Windows build 2017-01-28 14:35:35 -08:00
Sam Lantinga
869b7fe314 Fixed bug 3550 - No mouse move messages send while over the titlebar and windows edges
Matthew

Its possible to set SDL_CaptureMouse() so you continue receiving mouse input while the mouse is outside your window. This works however There is then a gap where no messages send, which is when the mouse is hovering the title bar and the window edges.
2017-01-28 11:17:10 -08:00
R?mi Verschelde
c3eea703ee Use a stronger X font definition for X11_MessageBox on UTF-8
X11 seemed to be confused by the broad definition, so WEIGHT_NAME,
SLANT and SETWIDTH_NAME were defined, thus fixing the font lookup
on some systems (tested on Mageia 6 with X11 1.19.1).

Fixes bug 3571.
2017-01-28 10:54:12 +01:00
Sam Lantinga
0090a33805 Return an error if trying to set a window minimum size larger than the maximum size, or vice versa 2017-01-27 21:16:38 -08:00
Philipp Wiesemann
4f981df37f Haiku: Fixed memory leak if creating framebuffer failed. 2017-01-22 22:15:36 +01:00