X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl%2Fg_system.pas;h=4cb69f90349c26ac449f029ded27ff3e30303747;hb=96f8e6b190e94847ab2527cc07ee8b19589c05fa;hp=4a4a3cb34c92799203e3db627d004a33d2d7769a;hpb=4171d8dd0b8d733da27c584616e431811bf0fdcf;p=d2df-sdl.git diff --git a/src/game/sdl/g_system.pas b/src/game/sdl/g_system.pas index 4a4a3cb..4cb69f9 100644 --- a/src/game/sdl/g_system.pas +++ b/src/game/sdl/g_system.pas @@ -24,7 +24,7 @@ interface procedure sys_Delay (ms: Integer); (* --- Graphics --- *) - function sys_GetDispalyModes (bpp: Integer): SSArray; + function sys_GetDisplayModes (bpp: Integer): SSArray; function sys_SetDisplayMode (w, h, bpp: Integer; fullscreen: Boolean): Boolean; procedure sys_EnableVSync (yes: Boolean); procedure sys_Repaint; @@ -109,7 +109,7 @@ implementation screen := SDL_SetVideoMode(w, h, bpp, flags); if screen <> nil then begin - {$IFDEF USE_NOGL} + {$IFDEF NOGL_INIT} nogl_Init; {$ENDIF} SDL_WM_SetCaption(GameTitle, nil); @@ -133,7 +133,7 @@ implementation (* ??? *) end; - function sys_GetDispalyModes (bpp: Integer): SSArray; + function sys_GetDisplayModes (bpp: Integer): SSArray; var m: PPSDL_Rect; f: TSDL_PixelFormat; i, count: Integer; begin SetLength(result, 0); @@ -142,7 +142,7 @@ implementation f.BitsPerPixel := bpp; f.BytesPerPixel := (bpp + 7) div 8; m := SDL_ListModes(@f, SDL_OPENGL or SDL_FULLSCREEN); - if (m <> NIL) and (IntPtr(m) <> -1) then + if (m <> NIL) and (UIntPtr(m) <> UIntPtr(-1)) then begin count := 0; while m[count] <> nil do inc(count); @@ -470,7 +470,7 @@ implementation RemoveJoystick(i); if screen <> nil then begin - {$IFDEF USE_NOGL} + {$IFDEF NOGL_INIT} nogl_Quit; {$ENDIF} SDL_FreeSurface(screen)