Sylvain
f7d3abddba
Fixed bug #964 - SDL_RenderCopy stretch loses proportion on viewport.
...
Handle the case when there is blending
2022-01-29 10:19:08 +01:00
pionere
a5c610b0a3
revert 'Changed to use 0xFE instead of 0xFF for better sound quality.'
2022-01-28 20:40:19 -05:00
Ryan C. Gordon
43f0271b4e
Revert "fix compiler warnings in SDL_windows_gaming_input.c"
...
This reverts commit ca36cdb185f2f26241598068927821896f36b904.
The older Windows SDK's headers are wrong, and this change would crash if
you hotplug a device.
2022-01-28 20:40:19 -05:00
pionere
a70bb259c7
drop handle parameter of OpenDevice
2022-01-28 20:40:19 -05:00
pionere
47ddb04e17
cleanup/sync the main loop of *_OpenDevice functions to pick audio format II.
2022-01-28 20:40:19 -05:00
pionere
2eafe4340c
cleanup/sync the main loop of *_OpenDevice functions to pick audio format
2022-01-28 20:40:19 -05:00
pionere
3939ef72f8
cleanup SDL_GetAudioDeviceSpec
...
- drop unnecessary hascapture check
- call SDL_InvalidParamError and return -1 in case the index is out of range
- do not zfill SDL_AudioSpec
- adjust documentation to reflect the behavior
2022-01-28 20:40:19 -05:00
pionere
113109f839
cleanup SDL_GetAudioDeviceName
...
- drop unnecessary hascapture check
- call SDL_InvalidParamError in case the index is out of range
2022-01-28 20:40:19 -05:00
pionere
f91211eb17
cleanup WASAPI_PrepDevice
...
- reorganize the loop which checks for the right wave-format
- use the return value of UpdateAudioStream
- ensure SetError is called in SDL_NewAudioStream
2022-01-28 20:40:19 -05:00
pionere
c9e8d1573a
re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory II.
2022-01-28 20:40:19 -05:00
pionere
1043dd8c0d
adjust handling of iscapture
...
- drop iscapture parameter of OpenDevice
- use SDL_bool for iscapture
2022-01-28 20:40:19 -05:00
pionere
e2f70a2dff
cleanup SDL_EventState
2022-01-28 20:40:19 -05:00
pionere
32c7d5d352
cleanup IME_UpdateInputLocale
...
- do not store the HKL in a static variable
- always set the ime_candvertical value in case the HKL is changed
2022-01-28 20:40:19 -05:00
pionere
25aa7244dc
cleanup IME_GetId
...
- use assert instead of a check (it is a static function with constant parameter)
- assume it is called with 0 first (simplifies the logic)
- reuse dwLang value instead of a new 'call' to LANG()
2022-01-28 20:40:19 -05:00
pionere
60deadba59
re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory
2022-01-28 20:40:19 -05:00
pionere
ebdd536676
use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
2022-01-28 20:40:19 -05:00
pionere
4a17612bff
get rid of BeginLoopIteration
2022-01-28 20:40:19 -05:00
pionere
0770c5829c
get rid of PrepareToClose
2022-01-28 20:40:19 -05:00
Ryan C. Gordon
e0236c02ce
audio: Removed an unnecessary commented-out line.
2022-01-28 20:40:19 -05:00
pionere
0dda8a7f4c
cleanup init functions of audio
...
- use SDL_bool if possible
- assume NULL/SDL_FALSE filled impl
- skip zfill of current_audio at the beginning of SDL_AudioInit (done before the init() calls)
2022-01-28 20:40:19 -05:00
pionere
6fcfcc3d6f
get rid of SkipMixerLock
2022-01-28 20:40:19 -05:00
pionere
3c85cef46c
cleanup SDL_RegisterApp
...
- fix memory leak when RegisterClassEx fails
- set style according to the documentation
- eliminate duplicated SDL_Instance setter
2022-01-28 20:40:19 -05:00
pionere
014e2bbdb2
use SDL_COMPILE_TIME_ASSERT instead of SDL_STATIC_ASSERT
2022-01-28 20:40:19 -05:00
pionere
95f30c7a48
fix compiler warnings in video/uikit
2022-01-28 20:40:19 -05:00
pionere
176941a4fb
allow MacOS build without SDL_FILE
2022-01-28 20:40:19 -05:00
pionere
eb80f2c65a
sync handling of subsystems II.
2022-01-28 20:40:19 -05:00
pionere
942b01a54c
do not use RWOps in WIN_SetWindowIcon
2022-01-28 20:40:19 -05:00
pionere
bf66720a4d
fix mixing of U16 audio
2022-01-28 20:40:19 -05:00
pionere
905e2e22ef
cleanup of SDL_MixAudioFormat
2022-01-28 20:40:19 -05:00
pionere
d7110b4490
fix compiler warnings in SDL_windows_gaming_input.c
2022-01-28 20:40:19 -05:00
pionere
e11ba0f5d9
do not load/unload opengl library when SDL_WINDOW_METAL flag is changed
2022-01-28 20:40:19 -05:00
Sylvain
f5911bdc59
GLES2: disable texcoord when not using it (see bug #5235 )
...
similar to opengl backend code:
- glDisableVertexAttribArray doesn't need to depend on 'drawstate.texture' value
- move binding code to SetCopyState()
2022-01-28 19:25:40 +01:00
Sylvain
096fe37bb2
GLES2: revert 7bf8c5a388
2022-01-28 19:25:40 +01:00
Sylvain
a988ce5544
Fixed bug #964 - SDL_RenderCopy stretch loses proportion on viewport boundaries
2022-01-28 17:24:59 +01:00
Sylvain
7bf8c5a388
GLES2: disable texcoord when not using it (see bug #5235 )
2022-01-27 21:49:05 -05:00
Vitaliy Zhmurikov
5b74459255
Update SDL_joystick.c
...
Add Logitech Momo Racing Wheel VID & PID to SDL_IsJoystickProductWheel function
2022-01-27 12:30:41 -08:00
Ryan C. Gordon
19ae71b2db
video: Don't add SDL_WINDOW_(METAL|OPENGL) to new windows if unsupported.
...
Fixes #4656 .
(Better than the previous fix in 3044310518dbb2d4814b32c6521f332b8d69aae5.)
2022-01-27 11:49:15 -05:00
Ivan Epifanov
d7e0c54dde
PSVita: send initial SDL_JOYDEVICEADDED events
2022-01-27 08:47:53 -08:00
Cameron Gutman
cc40f732f9
wayland: Round the refresh rate rather than truncating it
...
A 59999 mHz monitor should be reported as 60 Hz, not 59 Hz.
2022-01-26 21:27:13 -06:00
Ryan C. Gordon
3044310518
video: Don't add SDL_WINDOW_METAL to new windows if not using Cocoa or UIKit.
...
Fixes #4656 .
2022-01-26 21:10:15 -05:00
Cameron Gutman
77a9ca6ba0
wayland: Fix SDL_SetWindowSize() being dropped right after exiting fullscreen
...
If we get a SDL_SetWindowSize() call right after SDL_SetWindowFullscreen() but
before we've gotten a new configure event from the compositor, the attempt to
set our window size will silently fail (when libdecor is enabled).
Fix this by remembering that we need to commit a new size, so we can do that
in decoration_frame_configure().
2022-01-26 19:48:16 -05:00
Cameron Gutman
c6ec5a07f1
d3d11: Respect SDL_HINT_RENDER_DIRECT3D_THREADSAFE when creating device
2022-01-26 18:44:29 -06:00
Ryan C. Gordon
f37e4a94d3
video: Don't check if we can use a "texture framebuffer" until needed.
...
This prevents SDL from making an OpenGL context and maybe throwing it away
immediately by default. It will now only do it when trying to request a
window framebuffer directly, or creating an SDL_Renderer with the "software"
backend, which makes that request itself.
The way SDL decides if it should use a "texture framebuffer" needs dramatic
updating, but this solves the immediate problem.
Reference Issue #4624 .
2022-01-26 17:06:25 -05:00
Ethan Lee
8ceba27d62
video: Prefer Wayland over X11
2022-01-26 12:32:45 -05:00
Ethan Lee
68a71f91c6
wayland: Try to avoid committing before the window is shown
2022-01-25 17:19:19 -05:00
Sam Lantinga
84320266f2
Fixed the queue filling up with sentinel events when the WaitEvent call is passed NULL for the event
...
The use case is an application that waits for events on the main thread and dispatches them on a separate thread.
2022-01-25 12:37:43 -08:00
Ethan Lee
f0e768da43
wayland: Call SetFullscreen directly in ShowWindow.
...
This cuts out an extra flush when getting the first configure event.
2022-01-25 13:07:00 -05:00
Sylvain
8c660ccb6f
Fixed bug #5256 : X11 Segmentation fault with multiple windows and renderers
...
First window is created and it triggers and 'EnterNotify' event
which calls SDL_SetMouseFocus() and X11_ShowCursor() while the second
windows hasn't finished to be created (eg window->driverdata isn't set)
Just check for a valid 'driverdata'
2022-01-25 17:18:40 +01:00
Ethan Lee
e2d74bcbe5
wayland: Detach hidden surfaces in HideWindow, not ShowWindow
2022-01-25 11:16:09 -05:00
ulatekh
57bc90403e
Add hint to optionally forcibly raise the window under MS Windows.
2022-01-24 11:10:57 -08:00