Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-14] Crash in palette_update code #16

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMake/platforms/dreamcast.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ set(JOY_BUTTON_START 3)
#GPF SDL files
set(SDL_INCLUDE_DIR /usr/include/SDL/)
set(SDL_LIBRARY /usr/lib/libSDL.a)

add_compile_options(-flto=none)
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
Loading