Sylvain
763d768f7d
Fix bug #9331 - SDL3 Android crash getVibrator() == null
...
(cherry picked from commit 1855ce68af )
2024-03-23 16:32:00 -07:00
Sylvain
237535b23a
Fixed bug #8897 - SDL_BlitSurface segfault when dest_rect is null
2024-01-22 09:22:41 +01:00
Sylvain
5368f45567
Remove one test that contains call of SDL_Quit() / SDL_Init() because it
...
conficts with the initializaion of test common.
(before it used SDL_VideoInit SDL_VideoQuit which weren't perturbated by SDL_Quit())
2024-01-21 23:44:53 +01:00
Sylvain
3d5679bb8e
Fix video_getSetWindowPosition() that fail when checking events,
...
because testautomation_events.c() didn't finish to poll all events before
(cherry picked from commit 3ccfd361cb )
2024-01-21 23:44:53 +01:00
Sylvain
f1bc5f305c
Prevent asan warning on qsort():
...
'src/stdlib/SDL_qsort.c:27:5: runtime error: null pointer passed as argument 1, which is declared to never be null`
(cherry picked from commit 2cd583ee13 )
2024-01-20 11:26:37 +01:00
Sylvain
5d6eb4a5a5
Fixed overflow in SDL_SoftStretch() (see #8878 )
...
(cherry picked from commit 7b02d328fa )
2024-01-20 06:39:21 +01:00
Sylvain Becker
bb969ac747
Fixed bug #7614 : Segmentation Fault in SDL_BlitSurface ( #7808 )
...
Update SDL_BlitSurface to use Intersect functions
(cherry picked from commit 3639743d89 )
2024-01-19 08:53:16 -08:00
Sylvain
9db80adfba
Fixed bug #7614 : Segmentation Fault in SDL_BlitSurface
...
(cherry picked from commit e6c8872fdc )
2024-01-16 07:11:19 -08:00
Sylvain
f3b0dc5007
Fixed bug #8301 - Software renderer draws long lines incorrectly / SDL_RENDERLINEMETHOD_GEOMETRY
...
(cherry picked from commit ce0e0675de )
2024-01-16 07:08:15 -08:00
Sylvain
347b6cdcb6
Prevent ASAN warning:
...
like SDL_triangle.c:305:30: runtime error: left shift of negative value -672
(even if the value was correctly computed)
(cherry picked from commit 4033a0a83b )
2024-01-13 13:58:30 +01:00
Sylvain
01fa4dd9d1
Fixed ASAN warning, runtime error: left shift of 160 by 24 places cannot be represented in type 'int'
...
(cherry picked from commit cf0d1d7234 )
2024-01-11 09:02:19 -08:00
Sylvain
3a8032f491
Make sure the string is terminated, fixed invalid read in SDL_PrivateGameControllerParseControllerConfigString()
...
(cherry picked from commit 312f98c2a1 )
2023-12-23 12:58:54 -08:00
Sylvain
9720672374
Fix compilation / same as sdl2-compat
...
testautomation_platform.c:351:28: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
351 | result = SDL_SetError("%s", testError);
| ^~
/home/slvn/release/Release_SDL/sdl2-compat/test/testautomation_platform.c:364:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
364 | "SDL_GetError(): expected message '%s', was message: '%s'",
(cherry picked from commit 56f111dffc )
2023-12-20 22:29:51 +03:00
Sylvain Becker
f3419d8c04
Re-add SDL_assert() with non boolean ptr syntax ( #8531 )
2023-11-11 12:29:05 +03:00
Sylvain Becker
a14b948b6c
[SDL2] pointer boolean ( #8523 )
2023-11-10 06:30:56 -08:00
Sylvain
df6db90dd4
Fix sdltest_randomAsciiStringWithMaximumLength() where it requests a string a size 0
...
seen with: ./testautomation --seed MILAFAP2AKVP3V4G --filter sdltest_randomAsciiStringWithMaximumLength
2023-10-13 20:23:01 +02:00
Sylvain
16c9bad786
Safety fix: clear "_this->wakeup_window" when destroying the window
...
(cherry picked from commit c838ccf0e3 )
2023-03-28 08:29:24 -07:00
Sylvain
6574e5eb57
Safety fix: clear "_this->current_glwin" when destroying the window
...
(cherry picked from commit 0c048d98af )
2023-03-28 08:29:23 -07:00
Sylvain
4fa21ee5ed
Fixed bug #7515 - Window still grabbed after destroying
2023-03-28 09:43:34 +02:00
Sylvain
2dddaa7dc9
backport x11/sdl2 fixes
...
4b1378f
X11: fix size/position (test video_setWindowCenteredOnDisplay)
this fix x11 backend to correctly pass video_setWindowCenteredOnDisplay()
get border values early (eg status bar)
wait for size/position change to get valid values
d4d26e0
testautomation_video: if SDL_SetWindowSize/Position isn't honored, we should check there is an event
x11: send the events if various occasions
2023-03-25 10:27:17 +01:00
Sylvain
23bce27b26
Change SDL_BLENDMODE_MUL for gl renderers
...
Add FIXME for PSP and DirectFB
2023-03-16 20:27:09 +01:00
Sylvain
c078dfcf6b
Refresh generation of SDL_blit_auto.c after simplifying sdlgenblit.pl
2023-03-16 20:27:09 +01:00
Sylvain
18c4db678b
Simplify SDL_BLENDMODE_MUL in sdlgenblit.pl
2023-03-16 20:27:09 +01:00
Sylvain
7d26ba754a
Simplify SDL_BLENDMODE_MUL
2023-03-16 20:27:09 +01:00
Sylvain
bd70ce7f94
Refresh generation of SDL_blit_auto.c
2023-03-16 20:27:09 +01:00
Sylvain
d948e6c3c5
Fix potential de-referencing null pointer in SDL_EVDEV_kbd_keycode()
2023-02-16 08:23:22 +01:00
Sylvain
45e5f0f10b
Fixed bug #7302 - Memory 'leak' in SDL_SetMouseSystemScale()
2023-02-13 09:43:13 +01:00
Sylvain
17515f4aef
Backport simplify flags PR #7220
2023-02-09 17:19:46 -08:00
Sylvain
5d1e6b28d9
SDL_test_harness: fix memory leak when generated seed
2023-01-16 10:43:28 +01:00
Sylvain
c638b4a682
SDL_CreateAudioStream: check for invalid parameters
2023-01-16 09:26:05 +01:00
Sylvain
7bf4319eb2
fix computation of alpha in BlitRGBtoRGBPixelAlphaMMX3DNOW (see #6990 )
...
( same as BlitRGBtoRGBPixelAlphaMMX )
2023-01-06 21:24:24 +01:00
Sylvain
0ebda87425
Fixed bug #6990 : fix computation of alpha in BlitRGBtoRGBPixelAlphaMMX
2023-01-06 08:50:33 -08:00
Sylvain
0a9f61fbf1
Wayland / Drag and Drop: find the current window
2023-01-03 19:07:28 +01:00
Sylvain Becker
d234f7a498
SDL2: backport SDL_CalculateYUVSize() that checks for YUV size overflow ( #6972 )
2023-01-02 09:09:57 -08:00
Sylvain
2fd9e63f1a
Android: orientation, check for exact match to "Portrait". (see #6959 )
...
(Portrait is also contained in PortraitUpsideDown)
2023-01-02 09:48:26 +01:00
Sylvain
874ebed14d
Android: inverse LandscapeLeft and LandscapeRight (see #6959 )
...
LandscapeLeft has now been set to ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE and LandscapeRight to ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE in order to reflect the docs: https://wiki.libsdl.org/SDL2/SDL_HINT_ORIENTATIONS
2023-01-02 09:48:17 +01:00
Sylvain Becker
36c87d9f27
Android JAVA DetectDevices: 'is_capture' is inverted ( #6845 )
...
* Android JAVA DetectDevices: 'is_capture' is inversed
* Android Audio: adding audio device. also inverted capture, from jni side
2022-12-18 16:56:43 +01:00
Sylvain Becker
4e3fc0c1dc
Android: make Detect devices common between aaudio and android driver. ( #6828 )
...
remove VLA, dynamic alloc, check max length get using GetIntArrayRegion
2022-12-18 12:08:24 +01:00
Sylvain
8e72be3117
testime.c: fix wrong {} in switch
2022-12-15 14:39:05 +01:00
Sylvain Becker
582fb3901a
DBus: add a reference to the connection
...
Fixed bug #6712
2022-12-14 17:46:52 +01:00
Sylvain
faa7e3cc2e
Update DYNAPI SDL_WinRTRunApp() prototype which was wrong (see #6783 )
2022-12-10 19:22:27 +01:00
Sylvain
5efc9bd194
SDL_dynapi_procs: fixed SDL_UIKitRunApp prototype (see #6783 )
2022-12-10 19:22:08 +01:00
Sylvain
3e9ae3ea64
Fix wrong clang-tidy modification. This is an integer division. Thanks @meyraud705 (see PR #6725 )
2022-12-03 13:39:03 +01:00
Sylvain
0a91a793cf
Fix Conditional jump or move depends on uninitialised value(s)
...
eg ./testsprite2 --trackmem
2022-12-02 21:13:40 +01:00
Sylvain
09ee811f4b
Small format changed (using clang-format 15.0.2-1)
...
(cherry picked from commit 778b8926b4 )
2022-12-01 08:29:15 -08:00
Sylvain
8cda5102fc
Fixed bug #6698 - VISA: wrong check sceKernelPollSema
2022-11-29 16:16:10 +01:00
Sylvain Becker
fb0ce375f0
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 6a2200823c to reduce conflicts merging between SDL2 and SDL3)
2022-11-28 12:33:03 -08:00
Sylvain Becker
192cdf3d04
SDL_mfijoystick.m: remove VLA, so that projects can be built with error on vla
2022-11-24 18:33:50 +03:00
Sylvain
16824865c2
Cleanup of SDL_SetError that already return -1 value
2022-11-18 06:59:10 -08:00
Sylvain
3e70553c48
Unneed test before calling SDL_FreeSurface
2022-11-18 06:58:34 -08:00
Sylvain
71f2864b3a
Fix usage of sizeof() in test/testgles*.c files
2022-11-17 14:55:49 +01:00
Sylvain
89572af6a8
Fixed bug #6537 - AIX: use PAUDIO_WaitDevice
2022-11-17 11:43:46 +01:00
Sylvain
cd0d5a5fc5
Don't compare pointer against '0', but NULL
2022-11-17 11:23:15 +01:00
Sylvain
ddad901c0d
Remove unneeded semicolon
2022-11-17 10:43:45 +01:00
Sylvain
60c6cd554d
Fixed bug #6533 - PS2_JoystickUpdate: some invalid condition
2022-11-17 09:34:27 +01:00
Sylvain
b7358e47d5
Don't compare pointer against '0', but NULL
2022-11-17 09:18:49 +01:00
Sylvain
4192d1a1c7
Fix compilation. It needs to be casted to 'int' type
2022-11-16 21:56:19 +01:00
Sylvain
ce5da5d579
Don't compare pointer against '0', but NULL
2022-11-16 21:47:43 +01:00
Sylvain
1d7966df15
Remove un-needed check for NULL pointer. They were previously checked just before.
2022-11-16 21:27:16 +01:00
Sylvain
dfbb93dd0c
SDL_Renderer / GLES2: add specific list of indice to render rect (see #6401 )
2022-10-18 11:31:30 +02:00
Sylvain
e8a4c23ce5
Revert commit 790fa3156c.
...
SDL_BLENDMODE_INVALID case is probably used for custom blendmode
2022-10-18 10:45:01 +02:00
Sylvain
790fa3156c
Fix warning: enumeration value 'SDL_BLENDMODE_INVALID' not explicitly handled in switch
2022-10-18 10:41:10 +02:00
Sylvain
3ec4c9b3b9
Merge remote-tracking branch 'refs/remotes/origin/main'
2022-10-18 10:37:22 +02:00
Sylvain
3d99d31026
Fixed bug #6401 - back-end can choose the order the triangles when rendering rects, attempt to fix small glitch rendering.
2022-10-18 10:34:56 +02:00
Sylvain
285cbf6fdd
Revert commit 485bb3565b.
...
"Fixed bug #6401 - change the order of triangles when using RenderCopy, RenderCopyEx and RenderFillRect"
because the glitch reappears on other backend
2022-10-18 10:04:06 +02:00
Sylvain
485bb3565b
Fixed bug #6401 - change the order of triangles when using RenderCopy, RenderCopyEx and RenderFillRect
2022-10-17 13:30:30 +02:00
Sylvain
f69e004d01
Android default to dynamic API disabled (see #6381 )
2022-10-12 13:58:41 +02:00
Sylvain
f6ff87788a
Android default to dynamic API disabled (see #6381 )
2022-10-12 13:55:14 +02:00
Sylvain
fdef96e233
Android: remove "nativeSetComposingText" since it's not used anymore
...
(and it may fail registering at init if code is cleaned with proguard)
2022-10-04 12:08:09 +02:00
Sylvain
eac3d6d3c0
SDL_video.c: fix variable 'i' may be uninitialized when used here "_this->name = bootstrap[i]->name;"
2022-10-04 10:46:42 +02:00
Sylvain
d71df6448b
Fixed bug #6287 - SDL_FillRect failed for SDL_Surface with BitsPerPixel == 4
2022-09-27 10:21:15 +02:00
Sylvain
90a480a100
Fixed bug #6199 - Broken clip behaviour on a render target (metal)
2022-09-08 05:44:39 +02:00
Sylvain
03485db0a3
Android: understand HAL_PIXEL_FORMAT_BGR_565 as a returned value from ANativeWindow_getFormat() (see #6016 )
2022-09-03 23:40:14 +02:00
Sylvain
f815580dde
Fix SIGSEV in SDL_error. Re-apply same pattern on this uncompiled code (see #5795 )
2022-06-28 13:09:38 +02:00
Sylvain
d4e6047e3c
Fix SIGSEV in SDL_error (After removing the limit on the size of the SDL error message) (see #5795 )
2022-06-28 09:46:12 +02:00
Sylvain
314bb5a1ed
Fixed bug #5850 : Android EGL_BAD_ACCESS because of viewport command while turning the screen off/on.
2022-06-27 14:45:14 +02:00
Sylvain
2cc2260435
Fixed bug #5768 - SDL_RenderGeometry's software backend failed to render when texture coordinates are reversed
...
handle flip vertical/horizontal when reconstructing rects from triangles
2022-06-07 16:30:01 +02:00
Sylvain
6b9884d40a
Fixed bug #4213 - update documentation to reflect SDL2 behavior of SDL_RenderGetLogicalSize
2022-05-12 09:36:49 +02:00
Sylvain
1ede941f5c
SDL_render.c: internally change viewport/cliprect type from SDL_FRect to SDL_DRect (double precision). (see bug #5547 )
2022-04-18 12:26:32 -07:00
Sylvain Becker
1c9299b00d
Add SDL_list to macosx xcode
2022-04-01 08:12:31 +02:00
Sylvain
78834b50d6
Add SDL_list.c/h
2022-04-01 08:01:44 +02:00
Sylvain
ad6bc521bd
Move SDL_List functions to SDL_list.c to avoid more merge with eventual PR
2022-04-01 07:59:16 +02:00
Sylvain
bf38fd4679
YUV: fix invalid read on last line when converting from SDL_PIXELFORMAT_YUY2 (see bug #4841 )
2022-03-25 11:52:50 +01:00
Sylvain
6c56193a2a
Fixed bug #1650 : X11 doesn't set KMOD_NUM and KMOD_CAPS to system state
2022-03-24 18:09:45 +01:00
Sylvain Becker
c23a7ad38a
Add SDL_RenderGetWindow() API to get the window associated with a renderer ( #5440 )
...
Add SDL_RenderGetWindow() API to get the window associated with a renderer
2022-03-23 17:07:56 +01:00
Sylvain
f5a980448e
Android: add SetWindowResizable() implementation
...
- which also enable/disable the orientation lock status.
This is only provided when the window is not SDL_WINDOW_FULLSCREEN (see SDL_video.c).
Final orientation also depends on SDL_HINT_ORIENTATIONS.
2022-03-23 10:13:56 +01:00
Sylvain
83df4a354e
SDL_render.c: remove unsused case, since renderer target has been forced to NULL previously (see bug #4213 )
2022-03-22 15:25:01 +01:00
Sylvain
9dc201d448
Fixed bug #2962 - when SDL_RenderReadPixels format = 0, used format of the target texture
...
include/SDL_render.h, format:
"0 to use the format of the rendering target "
2022-03-21 10:41:14 +01:00
Sylvain
7f1feee02a
Fixed bug #2426 - SDL_RenderReadPixels result is unspecified and fails testautomation
...
Call SDL_RenderPresent after calling SDL_RenderReadPixels.
From "include/SDL_render.h":
"If you're using this on the main rendering target, it should be called after rendering and before SDL_RenderPresent()."
2022-03-21 10:20:04 +01:00
Sylvain
b2db570ce9
SDL_triangle_blit_slow: sync code with SDL_blit_slow to handle ARGB2101010
2022-03-16 18:09:40 +01:00
Sylvain
93e7caab9a
SDL_blit_slow: remove one nested 'if()' because of ARGB2101010 handling
2022-03-16 18:08:20 +01:00
Sylvain
56568ffb38
Remove 'reserved identifier' warning
2022-03-16 18:04:40 +01:00
Sylvain
90b13e1488
Merge remote-tracking branch 'refs/remotes/origin/main'
2022-03-15 17:50:57 +01:00
Sylvain
c44966b78b
Fixed bug #2691 - re-enable surface_testCompleteSurfaceConversion for ARGB2101010
2022-03-15 17:48:38 +01:00
Sylvain
f3e86b9fd3
Fixed bug #2199 : make SDL_blit_slow handles SDL_PIXELFORMAT_ARGB2101010, storing as RGBA
2022-03-15 17:46:12 +01:00
Sylvain Becker
3bebdaccb7
METAL: clip rect w/h must be <= render pass
2022-03-15 10:37:17 +01:00
Sylvain
0ad606b48d
Android: add comment to set render target to NULL when going to background (bug #4041 )
2022-03-14 10:43:18 +01:00
Sylvain
ea5b482bff
Remove unused warning
2022-03-09 15:38:36 +01:00
Sylvain
45833a148d
Prevent shadowing static variable '_this' with local paramter '_this' of SDL_CreateWindowTexture
2022-03-09 15:33:45 +01:00
Sylvain
a4a80c8607
Fix variable may be uninitialized when used here [-Wconditional-uninitialized]
2022-03-09 15:21:55 +01:00