Skip to content

Commit

Permalink
MorphOS: simplify OpenScreentags
Browse files Browse the repository at this point in the history
  • Loading branch information
BeWorld2018 committed Oct 10, 2023
1 parent 81973fb commit 4bc63b6
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions src/video/morphos/SDL_mosmodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,36 +302,20 @@ MOS_GetScreen(_THIS, BYTE fullscreen, SDL_bool support3d)
screen = LockPubScreen(NULL);
use_wb_screen = 1;
} 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

0 comments on commit 4bc63b6

Please sign in to comment.