Skip to content

Commit

Permalink
MorphOS: sync with SDL 2.28.4
Browse files Browse the repository at this point in the history
  • Loading branch information
BeWorld2018 committed Dec 21, 2023
1 parent ad547b6 commit cc609e7
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 186 deletions.
2 changes: 1 addition & 1 deletion sdl2-config
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ while test $# -gt 0; do
echo $exec_prefix
;;
--version)
echo 2.28.0
echo 2.30.0
;;
--cflags)
echo -noixemul -I${prefix}/include/SDL2
Expand Down
1 change: 0 additions & 1 deletion src/audio/ahi/SDL_ahi_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ AHIAUD_OpenDevice(_THIS, const char *devname)
hidden->buffers[0] = (Uint8 *) SDL_malloc(this->spec.size);
hidden->buffers[1] = (Uint8 *) SDL_malloc(this->spec.size);
if (hidden->buffers[0] == NULL || hidden->buffers[1] == NULL) {
D("[%s]No memory for audio buffer\n", __FUNCTION__);
SDL_SetError("No memory for audio buffer");
return -1;
}
Expand Down
44 changes: 14 additions & 30 deletions src/video/morphos/SDL_mosmodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ MOS_InitModes(_THIS)
Object **monitors;
STRPTR monitorname = NULL;
struct Screen *s;
APTR mon;
APTR mon = NULL;

SDL_zero(display);

Expand All @@ -160,7 +160,6 @@ MOS_InitModes(_THIS)
mode.driverdata = NULL;

s = LockPubScreen(NULL);
mon = NULL;

if (s) {
SDL_DisplayModeData *modedata;
Expand Down Expand Up @@ -295,43 +294,28 @@ MOS_GetScreen(_THIS, BYTE fullscreen, SDL_bool support3d)
int use_wb_screen = 0;
ULONG openError = 0;

D("[%s] Use monitor '%s' - Screen %d\n", __FUNCTION__, data->ScrMonName ? data->ScrMonName : (STRPTR)"Workbench", data->CustomScreen);

if (!fullscreen && data->ScrMonName == NULL) {
data->CustomScreen = NULL;
screen = LockPubScreen(NULL);
use_wb_screen = 1;
D("[%s] Use Ambient Screen (Workbench)\n", __FUNCTION__);

} else {
struct TagItem screentags[] =
{
{SA_Quiet, TRUE},
{SA_ShowTitle, FALSE},
{SA_AutoScroll, TRUE},
{SA_Title, (IPTR)"SDL2"},
{SA_AdaptSize, TRUE},
{SA_ErrorCode, (ULONG)&openError},
{support3d ? SA_3DSupport : TAG_IGNORE, TRUE},
{SA_GammaControl, TRUE},
{TAG_DONE}
};

D("[%s] Open screen %ldx%ldx%ld\n", __FUNCTION__, data->ScrWidth, data->ScrHeight, data->ScrDepth);

if (fullscreen && data->ScrMonName == NULL) {
screen = OpenScreenTags(NULL,
//SA_LikeWorkbench, TRUE,
SA_Width, data->ScrWidth,
SA_Height, data->ScrHeight,
SA_Depth, data->ScrDepth,
TAG_MORE, (IPTR)screentags);
} else {
screen = OpenScreenTags(NULL,

screen = OpenScreenTags(NULL,
/*support3d ? SA_3DSupport : TAG_IGNORE, TRUE,*/
SA_GammaControl, TRUE,
SA_Width, data->ScrWidth,
SA_Height, data->ScrHeight,
SA_Depth, data->ScrDepth,
SA_MonitorName, data->ScrMonName,
TAG_MORE, (IPTR)screentags);
}
data->ScrMonName ? SA_MonitorName : TAG_IGNORE , data->ScrMonName,
SA_Quiet, TRUE,
SA_ShowTitle, FALSE,
SA_Title, (IPTR)"SDL2",
SA_AdaptSize, TRUE,
SA_ErrorCode, (ULONG)&openError,
TAG_DONE);

if (screen)
data->CustomScreen = screen;
Expand Down
Loading

0 comments on commit cc609e7

Please sign in to comment.