Skip to content

Commit

Permalink
SpriteBatchTest boots
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Sep 26, 2024
1 parent 9f24e06 commit c123c65
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/FNAPlatform/SDL3_FNAPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public static string ProgramInit(LaunchParameters args)
}

// This _should_ be the first real SDL call we make...
if (SDL.SDL_Init(
if (!SDL.SDL_Init(
SDL.SDL_InitFlags.SDL_INIT_VIDEO |
SDL.SDL_InitFlags.SDL_INIT_GAMEPAD
))
Expand Down Expand Up @@ -412,7 +412,7 @@ public static GameWindow CreateWindow()
return new FNAWindow(
window,
@"\\.\DISPLAY" + (
SDL.SDL_GetDisplayForWindow(window) + 1
SDL.SDL_GetDisplayForWindow(window)
).ToString()
);
}
Expand Down Expand Up @@ -849,7 +849,7 @@ public static GraphicsAdapter RegisterGame(Game game)
// Which display did we end up on?
uint displayIndex = SDL.SDL_GetDisplayForWindow(
game.Window.Handle
);
) - 1;
return GraphicsAdapter.Adapters[(int) displayIndex];
}

Expand Down Expand Up @@ -1042,7 +1042,7 @@ ref bool textInputSuppress
*/
int newIndex = (int) SDL.SDL_GetDisplayForWindow(
game.Window.Handle
);
) - 1;

if (newIndex >= GraphicsAdapter.Adapters.Count)
{
Expand Down Expand Up @@ -1077,7 +1077,7 @@ ref bool textInputSuppress

uint displayIndex = SDL.SDL_GetDisplayForWindow(
game.Window.Handle
);
) - 1;
currentAdapter = GraphicsAdapter.Adapters[(int) displayIndex];

// Orientation Change
Expand Down Expand Up @@ -1280,6 +1280,13 @@ public static GraphicsAdapter[] GetGraphicsAdapters()
);
}
*/
List<DisplayMode> whatever = new List<DisplayMode>(1);
whatever.Add(new DisplayMode(1920, 1080, SurfaceFormat.Color));
adapters[0] = new GraphicsAdapter(
new DisplayModeCollection(whatever),
@"\\.\DISPLAY1",
"FIXME SDL3"
);
return adapters;
}

Expand Down

0 comments on commit c123c65

Please sign in to comment.