Changeset 304 for trunk/game/scripts


Ignore:
Timestamp:
10/03/09 17:42:23 (10 years ago)
Author:
eliedebrauwer
Message:

Ticket #98: Patch by Elie De Brauwer. Implemented minimum resolution filter of 1024x768 in options dialog, also adapted settings-dist.xml accordingly. comment[s:trac, t:98]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/hud.py

    r303 r304  
    220220        settings.setFullScreen(True) 
    221221        availableResolutions = settings.getPossibleResolutions() 
    222         self.Resolutions = [str(x[0])+'x'+str(x[1]) for x in availableResolutions]; 
     222 
     223        # Filter too small resolutions 
     224        self.Resolutions=[] 
     225        for x in availableResolutions: 
     226            if x[0]>=1024 and x[1]>=768: 
     227                self.Resolutions.append(str(x[0])+'x'+str(x[1])) 
     228 
    223229        settings.setFullScreen(current_fullscreen) 
    224230        self.RenderBackends = ['OpenGL', 'SDL'] 
Note: See TracChangeset for help on using the changeset viewer.