summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7987b26)
raw | patch | inline | side by side (parent: 7987b26)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 20 Jul 2022 17:42:13 +0000 (20:42 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 08:56:10 +0000 (11:56 +0300) |
src/game/sdl/g_system.pas | patch | blob | history |
index 8fdb42ca5b93ea3ea61ef2f14ff832f9ea53c07d..6d7cf03ef433b371fb4abcad6cf440f1c9b8cbd5 100644 (file)
uses Utils;
+ type
+ TGLProfile = (Core, Compat, Common, CommonLite);
+
+ TGLDisplayInfo = record
+ w, h, bpp: Integer;
+ fullscreen: Boolean;
+ maximized: Boolean;
+ major, minor: Integer;
+ profile: TGLProfile;
+ end;
+
(* --- Graphics --- *)
+
function sys_GetDisplayModes (bpp: Integer): SSArray;
function sys_SetDisplayMode (w, h, bpp: Integer; fullscreen, maximized: Boolean): Boolean;
procedure sys_EnableVSync (yes: Boolean);
procedure sys_Repaint;
+ function sys_SetDisplayModeGL (const info: TGLDisplayInfo): Boolean;
+
(* --- Input --- *)
+
function sys_HandleInput (): Boolean;
procedure sys_RequestQuit;
result := InitWindow(w, h, bpp, fullscreen)
end;
+ function sys_SetDisplayModeGL (const info: TGLDisplayInfo): Boolean;
+ begin
+ result := false;
+ case info.profile of
+ TGLProfile.Compat: result := InitWindow(info.w, info.h, info.bpp, info.fullscreen);
+ end;
+ end;
+
(* --------- Joystick --------- *)
procedure HandleJoyButton (var ev: TSDL_JoyButtonEvent);