index eec03232f7d26e99fd2619d39994ff5291b26257..9cd1ee194b0ae4b89bb587e593c689067fd477cb 100644 (file)
{$ENDIF}
end;
{$ENDIF}
end;
- function GetTitle (): PChar;
+ function GetTitle (): AnsiString;
var info: AnsiString;
begin
info := g_GetBuildHash(false);
if info = 'custom build' then
info := info + ' by ' + g_GetBuilderName() + ' ' + GAME_BUILDDATE + ' ' + GAME_BUILDTIME;
var info: AnsiString;
begin
info := g_GetBuildHash(false);
if info = 'custom build' then
info := info + ' by ' + g_GetBuilderName() + ' ' + GAME_BUILDDATE + ' ' + GAME_BUILDTIME;
- result := PChar(Format(GameTitle, [info]))
+ result := Format(GameTitle, [info]);
end;
function InitWindow (w, h, bpp: Integer; fullScreen, maximized: Boolean): Boolean;
end;
function InitWindow (w, h, bpp: Integer; fullScreen, maximized: Boolean): Boolean;
- var flags: UInt32; x, y: cint;
+ var flags: UInt32; x, y: cint; title: AnsiString;
begin
// note: on window close make: if assigned(oglDeinitCB) then oglDeinitCB;
e_LogWritefln('InitWindow %s %s %s %s', [w, h, bpp, fullScreen]);
begin
// note: on window close make: if assigned(oglDeinitCB) then oglDeinitCB;
e_LogWritefln('InitWindow %s %s %s %s', [w, h, bpp, fullScreen]);
x := wx;
y := wy
end;
x := wx;
y := wy
end;
- window := SDL_CreateWindow(GetTitle(), x, y, w, h, flags);
+ title := GetTitle();
+ window := SDL_CreateWindow(PChar(title), x, y, w, h, flags);
if window <> nil then
begin
context := SDL_GL_CreateContext(window);
if window <> nil then
begin
context := SDL_GL_CreateContext(window);