Skip to content

Commit

Permalink
MorphOS: adapt Window
Browse files Browse the repository at this point in the history
Delete shape
Delete SDL_HINT_RENDER_BATCHING
Update but no test...

TODO
  • Loading branch information
BeWorld2018 committed Jan 15, 2024
1 parent 851fc28 commit 65e4e1d
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 332 deletions.
23 changes: 2 additions & 21 deletions src/video/morphos/SDL_mosevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "SDL_mosmouse.h"

#include "SDL_timer.h"
#include "SDL_syswm.h"
#include "SDL.h"

#include <devices/rawkeycodes.h>
Expand Down Expand Up @@ -373,24 +372,6 @@ MOS_DispatchEvent(SDL_VideoDevice *device, struct IntuiMessage *m)
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
MOS_setenv("SDL_RENDER_SCALE_QUALITY", "linear", SDL_TRUE);
break;
case MID_BAUTO:
MOS_GlobalMenu(data->menu, 1, 7, 1, 0);
MOS_GlobalMenu(data->menu, 1, 7, 2, 0);
SDL_SetHint(SDL_HINT_RENDER_BATCHING, "");
MOS_setenv("SDL_RENDER_BATCHING", "", SDL_TRUE);
break;
case MID_BENABLE:
MOS_GlobalMenu(data->menu, 1, 7, 0, 0);
MOS_GlobalMenu(data->menu, 1, 7, 2, 0);
SDL_SetHint(SDL_HINT_RENDER_BATCHING, "0");
MOS_setenv("SDL_RENDER_BATCHING", "0", SDL_TRUE);
break;
case MID_BDISABLE:
MOS_GlobalMenu(data->menu, 1, 7, 0, 0);
MOS_GlobalMenu(data->menu, 1, 7, 1, 0);
SDL_SetHint(SDL_HINT_RENDER_BATCHING, "1");
MOS_setenv("SDL_RENDER_BATCHING", "1", SDL_TRUE);
break;
case MID_MDEF:
MOS_GlobalMenu(data->menu, 1, 8, 1, 0);
MOS_GlobalMenu(data->menu, 1, 8, 2, 0);
Expand Down Expand Up @@ -422,7 +403,7 @@ MOS_DispatchEvent(SDL_VideoDevice *device, struct IntuiMessage *m)
case MID_SHADERS_AUTO:
MOS_GlobalMenu(data->menu, 1, 9, 1, 0);
MOS_GlobalMenu(data->menu, 1, 9, 2, 0);
SDL_SetHint(SDL_HINT_RENDER_BATCHING, "");
SDL_SetHint(SDL_HINT_RENDER_OPENGL_SHADERS, "");
MOS_setenv("SDL_RENDER_OPENGL_SHADERS", "", SDL_TRUE);
break;
case MID_SHADERS_ENABLE:
Expand Down Expand Up @@ -568,7 +549,7 @@ MOS_CheckWBEvents(SDL_VideoDevice *device)
AddPart(filename, argptr->wa_Name, 1024);

D("[%s] SDL_SendDropfile : '%s'\n", __FUNCTION__, filename);
SDL_SendDropFile(window, filename);
SDL_SendDropFile(window, NULL, filename);
argptr++;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/video/morphos/SDL_mosopengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#if SDL_VIDEO_DRIVER_MORPHOS

#include "SDL_error.h"
#include "SDL_syswm.h"
#include "../SDL_sysvideo.h"
#include "SDL_mosvideo.h"
#include "SDL_mosmodes.h"
Expand Down
183 changes: 0 additions & 183 deletions src/video/morphos/SDL_mosshape.c

This file was deleted.

34 changes: 0 additions & 34 deletions src/video/morphos/SDL_mosshape.h

This file was deleted.

8 changes: 1 addition & 7 deletions src/video/morphos/SDL_mosvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "SDL_moskeyboard.h"
#include "SDL_mosmodes.h"
#include "SDL_mosmouse.h"
#include "SDL_mosshape.h"

#include "SDL_mosvideo.h"
#include "SDL_moswindow.h"
#include "SDL_mosmessagebox.h"
Expand Down Expand Up @@ -322,7 +322,6 @@ MOS_CreateDevice()
device->PumpEvents = MOS_PumpEvents;

device->CreateSDLWindow = MOS_CreateWindow;
device->CreateSDLWindowFrom = MOS_CreateWindowFrom;
device->SetWindowTitle = MOS_SetWindowTitle;
device->SetWindowIcon = MOS_SetWindowIcon;
device->SetWindowPosition = MOS_SetWindowPosition;
Expand All @@ -344,11 +343,6 @@ MOS_CreateDevice()
device->CreateWindowFramebuffer = MOS_CreateWindowFramebuffer;
device->UpdateWindowFramebuffer = MOS_UpdateWindowFramebuffer;
device->DestroyWindowFramebuffer = MOS_DestroyWindowFramebuffer;
device->GetWindowWMInfo = MOS_GetWindowWMInfo;

device->shape_driver.CreateShaper = MOS_CreateShaper;
device->shape_driver.SetWindowShape = MOS_SetWindowShape;
//device->shape_driver.ResizeWindowShape = MOS_ResizeWindowShape;

device->GL_LoadLibrary = MOS_GL_LoadLibrary;
device->GL_GetProcAddress = MOS_GL_GetProcAddress;
Expand Down
Loading

0 comments on commit 65e4e1d

Please sign in to comment.