Compare commits

..

13 Commits

Author SHA1 Message Date
Ozkan Sezer
d18b2e4129 typo fix to config.sub,
from https://lists.gnu.org/archive/html/config-patches/2023-01/msg00001.html
2023-01-21 10:15:02 +03:00
Ozkan Sezer
bd5c355a34 SDL_thread.h: fix SDL_CreateThreadWithStackSize macro for OS/2
(cherry-picked from commit 738442b82a)
2022-12-27 00:15:20 +03:00
Ozkan Sezer
facc408097 SDL_thread.h: fix beginthread param of SDL_CreateThreadWithStackSize for win32
(cherry-picked from commit 29ba5f5d64)
2022-12-27 00:15:20 +03:00
Vincent Hamm
c7d5642e43 Fix SDL_CreateThreadWithStackSize not passing staacksize with win32 static api 2022-12-27 00:15:20 +03:00
Anonymous Maarten
b42c033b13 cmake: use target_link_libraries to pass -Wl,--undefined=WinMain
(cherry-picked from commit e2060de714)
2022-11-29 21:15:22 +03:00
Frank Praznik
d41985cfbc wayland: Fix libdecor_dispatch signature
The function returns an int, not a bool.
(cherry picked from commit f47169fcba)
2022-11-24 17:27:40 +03:00
Ozkan Sezer
c1307133ce SDL_UDEV_DelCallback: return early if _this is NULL
Fixes https://github.com/libsdl-org/SDL/issues/6548
(cherry picked from commit 6dc96aa745)
2022-11-18 18:02:40 +03:00
Sylvain
4d605ae002 Fix usage of sizeof() in test/testgles*.c files
(cherry-picked from commit 71f2864b3a)
2022-11-17 17:29:28 +03:00
Sylvain
3a885f888a Fixed bug #6537 - AIX: use PAUDIO_WaitDevice 2022-11-17 11:57:07 +01:00
Ozkan Sezer
6539b70062 SDL_pixels.c (SDL_MasksToPixelFormatEnum): add missing break to switch.
Hand-picked from commit ec58a817ef
2022-11-16 20:55:04 +03:00
Ozkan Sezer
8b696541ed CI, MSVC: update to use microsoft/setup-msbuild v1.1.3.
Fixes github deprecation warnings
2022-11-16 00:56:04 +03:00
Anonymous Maarten
711d30ddd4 The SDL2::SDL2 target in SDL2.framework needs to see the SDL2 include folder
SDL.h includes other files through SDL2/SDL_xxx.h
2022-11-15 19:33:43 +01:00
Ryan C. Gordon
c93900437f audio: Avoid accumulation errors in resampler.
Fixes #6391.
(cherry picked from commit 78f97108f9)
2022-11-05 20:01:00 +03:00
13 changed files with 19 additions and 15 deletions

View File

@@ -66,7 +66,7 @@ jobs:
- name: Add msbuild to PATH
if: ${{ matrix.platform.project != '' }}
uses: microsoft/setup-msbuild@v1.0.2
uses: microsoft/setup-msbuild@v1.1.3
- name: Build msbuild
if: ${{ matrix.platform.project != '' }}
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}

View File

@@ -3036,11 +3036,10 @@ if(NOT WINDOWS_STORE AND NOT SDL2_DISABLE_SDL2MAIN)
target_link_libraries(SDL2main PRIVATE shell32)
endif()
if(MINGW OR CYGWIN)
cmake_minimum_required(VERSION 3.13)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
target_link_options(SDL2main PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=_WinMain@16>")
target_link_libraries(SDL2main PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=_WinMain@16>")
else()
target_link_options(SDL2main PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=WinMain>")
target_link_libraries(SDL2main PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=WinMain>")
endif()
endif()
if (NOT ANDROID)

View File

@@ -39,7 +39,7 @@ string(REGEX REPLACE "SDL2\\.framework.*" "" SDL2_FRAMEWORK_PARENT_PATH "${CMAKE
set_and_check(SDL2_PREFIX "${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_EXEC_PREFIX "${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_INCLUDE_DIR "${SDL2_FRAMEWORK_PATH}/Headers")
set(SDL2_INCLUDE_DIRS "${SDL2_INCLUDE_DIR}")
set(SDL2_INCLUDE_DIRS "${SDL2_INCLUDE_DIR};${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_BINDIR "${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_LIBDIR "${SDL2_FRAMEWORK_PATH}")
@@ -53,7 +53,7 @@ if(NOT TARGET SDL2::SDL2)
set_target_properties(SDL2::SDL2
PROPERTIES
INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\""
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2"
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
INTERFACE_SDL2_SHARED "ON"

View File

@@ -1075,7 +1075,7 @@ case $cpu-$vendor in
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
cpu=i586
;;
pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
cpu=i686
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)

View File

@@ -142,7 +142,7 @@ SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn,
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#else
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#endif
#elif defined(__OS2__)
@@ -175,7 +175,7 @@ SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const siz
#undef SDL_CreateThread
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#undef SDL_CreateThreadWithStackSize
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#else
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)

View File

@@ -247,7 +247,7 @@ SDL_ResampleAudio(const int chans, const int inrate, const int outrate,
*(dst++) = outsample;
}
outtime += outtimeincr;
outtime = outtimeincr * i;
}
return outframes * chans * sizeof (float);

View File

@@ -477,7 +477,7 @@ PAUDIO_Init(SDL_AudioDriverImpl * impl)
/* Set the function pointers */
impl->OpenDevice = PAUDIO_OpenDevice;
impl->PlayDevice = PAUDIO_PlayDevice;
impl->PlayDevice = PAUDIO_WaitDevice;
impl->WaitDevice = PAUDIO_WaitDevice;
impl->GetDeviceBuf = PAUDIO_GetDeviceBuf;
impl->CloseDevice = PAUDIO_CloseDevice;
impl->OnlyHasDefaultOutputDevice = SDL_TRUE; /* !!! FIXME: add device enum! */

View File

@@ -544,6 +544,10 @@ SDL_UDEV_DelCallback(SDL_UDEV_Callback cb)
SDL_UDEV_CallbackList *item;
SDL_UDEV_CallbackList *prev = NULL;
if (_this == NULL) {
return;
}
for (item = _this->first; item != NULL; item = item->next) {
/* found it, remove it. */
if (item->callback == cb) {

View File

@@ -436,6 +436,7 @@ SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
return SDL_PIXELFORMAT_RGB24;
#endif
}
break;
case 32:
if (Rmask == 0) {
return SDL_PIXELFORMAT_RGB888;

View File

@@ -204,7 +204,7 @@ SDL_WAYLAND_SYM(bool, libdecor_configuration_get_content_size, (struct libdecor_
int *))
SDL_WAYLAND_SYM(bool, libdecor_configuration_get_window_state, (struct libdecor_configuration *,\
enum libdecor_window_state *))
SDL_WAYLAND_SYM(bool, libdecor_dispatch, (struct libdecor *, int))
SDL_WAYLAND_SYM(int, libdecor_dispatch, (struct libdecor *, int))
#endif
#undef SDL_WAYLAND_MODULE

View File

@@ -173,7 +173,7 @@ main(int argc, char *argv[])
quit(2);
}
context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));
context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(*context));
if (context == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
quit(2);

View File

@@ -612,7 +612,7 @@ main(int argc, char *argv[])
return 0;
}
context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));
context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(*context));
if (context == NULL) {
SDL_Log("Out of memory!\n");
quit(2);

View File

@@ -522,7 +522,7 @@ main(int argc, char *argv[])
return 0;
}
context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));
context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(*context));
if (context == NULL) {
SDL_Log("Out of memory!\n");
quit(2);