(Linux/Unix) SDL_SetVideoMode hat Probleme mit FULLSCREEN



  • Hallo,

    ich habe ein kleines Testprogramm mit SDL geschrieben(unter KDE). Ich möchte den Modus 640x480x16 anschalten und zwar im Vollbildmodus. Allerdings wird die Auflösung nicht umgeschaltet, sondern der Ausschnitt zentriert in der aktuellen Auflösung dargestellt. Woran liegt das? Unter Windows klappt die Umstellung der Auflösung.

    Danke im voraus...



  • Lies mal da: http://sdldoc.csn.ul.ie/sdlsetvideomode.php

    Kurzes Zitat:
    "Your xserver must support the rsolution that you want to switch to, make
    sure that your /etc/X11/XF86Config (for me) has a line like this:
    Modes "1280x1024" "1024x768" "800x600" "640x480"
    (this is my file so may have diffrent modes)"

    Dazu die frage - hast du den gewünschten mode eingetragen?



  • SDL Fragen bitte im Grafik Forum stellen und nun ab dahin mit dem Thread



  • @SnorreDev:

    Ich habe mal nachgeschaut, aber die Zeile "Modes ....." nicht gefunden. In meiner XF86Config stehen u.a. folgende Einträge:

    .
    .
    .
    
    Section "Monitor"   
      Identifier    "Primary-Monitor"
      VendorName    "Unknown"
      ModelName "Unknown"
      HorizSync 31.5-64
      VertRefresh   50-120
      Modeline "1400x1050" 116.22 1400 1416 1704 1816 1050 1050 1060 1097
      Modeline "1280x960" 106.50 1280 1296 1552 1664 960 960 970 1003
      Modeline "1600x1000" 120.85 1600 1616 1968 2080 1000 1000 1008 1044
      Modeline "1024x864" 84.99 1024 1040 1216 1328 864 864 874 902
      Modeline "800x600" 66.56 800 816 928 1040 600 600 610 626
      Modeline "1152x864" 95.74 1152 1168 1384 1496 864 864 874 902
      Modeline "1280x1024" 106.50 1280 1296 1552 1664 1024 1024 1034 1070
      Modeline "640x480" 50.00 640 656 720 832 480 480 489 501
      Modeline "1024x768" 84.99 1024 1072 1248 1328 768 768 778 794
      Modeline "1600x1200" 120.85 1600 1616 1968 2080 1200 1200 1208 1253
    EndSection
    
    Section "Device"
      Identifier    "Primary-Card"
      VendorName    "---AUTO DETECTED---"
      BoardName "---AUTO DETECTED---"
    EndSection
    
    Section "Screen"  
      Driver    "SVGA"
      Device    "Primary-Card"
      Monitor   "Primary-Monitor"
      DefaultColorDepth 24
      SubSection "Display"
        Depth   32
        Modes   "640x480" 
      EndSubSection
      SubSection "Display"
        Depth   24
        Modes   "1024x768" 
        Virtual 1024 768
      EndSubSection
      SubSection "Display"
        Depth   16
        Modes   "640x480" 
      EndSubSection
      SubSection "Display"
        Depth   8
        Modes   "640x480" 
      EndSubSection
    EndSection
    
    Section "Screen"  
      Driver    "Accel"
      Device    "Primary-Card"
      Monitor   "Primary-Monitor"
      DefaultColorDepth 24
      SubSection "Display"
        Depth   32
        Modes   "640x480" 
      EndSubSection
      SubSection "Display"
        Depth   24
        Modes   "1024x768" 
        Virtual 1024 768
      EndSubSection
      SubSection "Display"
        Depth   16
        Modes   "640x480" 
      EndSubSection
      SubSection "Display"
        Depth   8
        Modes   "640x480" 
      EndSubSection
    EndSection
    

    Muss ich die Zeile Modes "640x480" "1024x768" ... noch hinzufügen?

    Ciao



  • Hi !

    Bei mir siehts so aus :

    Section "Screen"
    Identifier "Screen 1"
    Device "NVIDIA GeForce"
    Monitor "My Monitor"
    Option "NvAgp" "1"

    DefaultDepth 16
    Subsection "Display"
    Depth 16
    Modes "1024x768" "640x480"
    ViewPort 0 0
    EndSubsection
    EndSection

    Und da dies jetzt ein Linux Problem ist : Zurück ans Linuxforum 😃 😃


Anmelden zum Antworten