Results 1 to 8 of 8

Thread: Port To linux...

  1. #1

    Port To linux...

    hi... Happy new Year....
    So finally after two year almost.. with so little time to code... i must say that game project is near to done...

    It is writing in Lazarus using GLScene... and the next step before to give it to all... is to porting to linux...
    I have a problem...
    The function i use in win32 mode to set the screen resolution is the code above...

    Code:
    procedure SetScreen(bpp: byte; width, height, FR: integer);
    var
      D: TDevMode;
      h: HWND;
    begin
      h := 0;
      D.dmDeviceName[0] := 0;
      D.dmBitsPerPel := BPP;
      D.dmDisplayFrequency := FR;
      D.dmPelsWidth := Width;
      D.dmPelsHeight := Height;
      D.dmFields := DM_BITSPERPEL + DM_PELSWIDTH + DM_PELSHEIGHT +
        DM_DISPLAYFREQUENCY;
      D.dmSize := SizeOf(D);
      if ChangeDisplaySettings(D, CDS_TEST) =
        DISP_CHANGE_SUCCESSFUL then
        ChangeDisplaySettings(D, CDS_UPDATEREGISTRY)
    end;
    But the TDevMode uses the Window unit that does't work in linux...
    So how can i make that to work in X11.... or any other graph mode...

    Thank you ... and keep pascaling...

  2. #2
    Not sure about that, but I ended up using SDL to do all the windowing stuff for me with my game so it could run under Linux (Ubuntu) as well as Windows.
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  3. #3
    Quote Originally Posted by paul_nicholls View Post
    Not sure about that, but I ended up using SDL to do all the windowing stuff for me with my game so it could run under Linux (Ubuntu) as well as Windows.
    Thanks paul... i i'll want to find something similar with the code above...
    SDL never try it...

  4. #4
    Quote Originally Posted by azrael11 View Post
    Thanks paul... i i'll want to find something similar with the code above...
    SDL never try it...
    Maybe this code will help, I found it when googling:
    http://chelive.googlecode.com/svn-hi...oreDisplay.pas

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  5. #5
    Quote Originally Posted by paul_nicholls View Post
    Maybe this code will help, I found it when googling:
    http://chelive.googlecode.com/svn-hi...oreDisplay.pas

    cheers,
    Paul
    Thank you very much my friend ... when i found some time i test it ... from the little look i take i think is what i need...
    Thank you for your help....

    Wonder from what project is this... ?

  6. #6
    I translated the text from the front page of the project and it seems to be some 3d game framework project...
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  7. #7
    Member
    Join Date
    Apr 2012
    Location
    Düsseldorf im Rheinland
    Posts
    38
    i found on an russian site some linux-ports ... 4 demos
    http://rtbt.ru/index.php?board=3.0

    GOOD YEAR

  8. #8
    Quote Originally Posted by Micronix-TRSI View Post
    i found on an russian site some linux-ports ... 4 demos
    http://rtbt.ru/index.php?board=3.0

    GOOD YEAR
    Thank you very much ... i'll check it...
    Happy new year ...

    Thanks...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •