Skip to content

Commit

Permalink
Enable DMA driver once before SDL_Init
Browse files Browse the repository at this point in the history
  • Loading branch information
azihassan committed Oct 23, 2024
1 parent df4540b commit 8873aa8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Source/utils/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,6 @@ float GetDpiScalingFactor()
void SetVideoMode(int width, int height, int bpp, uint32_t flags)
{
Log("Setting video mode {}x{} bpp={} flags=0x{:08X}", width, height, bpp, flags);
#ifdef __DREAMCAST__
enable_dma_driver();
#endif
ghMainWnd = SDL_SetVideoMode(width, height, bpp, flags);
if (ghMainWnd == nullptr) {
ErrSdl();
Expand Down Expand Up @@ -323,6 +320,9 @@ bool SpawnWindow(const char *lpWindowName)
initFlags |= SDL_INIT_GAMECONTROLLER;

SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight");
#endif
#ifdef __DREAMCAST__
enable_dma_driver();
#endif
if (SDL_Init(initFlags) <= -1) {
ErrSdl();
Expand Down Expand Up @@ -478,9 +478,6 @@ void SetFullscreenMode()
if (*sgOptions.Graphics.fullscreen) {
flags |= SDL_FULLSCREEN;
}
#ifdef __DREAMCAST__
enable_dma_driver();
#endif
ghMainWnd = SDL_SetVideoMode(0, 0, 0, flags);
if (ghMainWnd == NULL) {
ErrSdl();
Expand Down

0 comments on commit 8873aa8

Please sign in to comment.