コード例 #1
0
 def SetDeviceCiderStartup(self, *args, **kwds):
     devSettings = args[0]
     settingsCopy = devSettings.copy()
     devSettings.BackBufferWidth, devSettings.BackBufferHeight = self.GetPreferedResolution(
         False)
     self.cider.SetFullscreen(True)
     DeviceMgr.SetDevice(self, devSettings, **kwds)
     self.cider.SetFullscreen(False)
     self.ciderFullscreenLast = False
     DeviceMgr.SetDevice(self, settingsCopy, **kwds)
コード例 #2
0
 def Initialize(self):
     DeviceMgr.Initialize(self)
     aaQuality = gfxsettings.Get(gfxsettings.GFX_ANTI_ALIASING)
     if aaQuality > 0 and self.GetMSAATypeFromQuality(aaQuality) == 0:
         gfxsettings.Set(gfxsettings.GFX_ANTI_ALIASING, 0, pending=False)
     shaderQuality = gfxsettings.Get(gfxsettings.GFX_SHADER_QUALITY)
     if shaderQuality == 3 and gfxsettings.MAX_SHADER_MODEL < gfxsettings.SHADER_MODEL_HIGH:
         gfxsettings.Set(gfxsettings.GFX_SHADER_QUALITY,
                         gfxsettings.SHADER_MODEL_MEDIUM,
                         pending=False)
コード例 #3
0
 def Initialize(self):
     DeviceMgr.Initialize(self)
     self.msaaTypes = {}
     gfxsettings.ValidateSettings()
     aaQuality = gfxsettings.Get(gfxsettings.GFX_ANTI_ALIASING)
     msaaQuality = gfxsettings.GetMSAAQuality(aaQuality)
     msaaType = self.GetMSAATypeFromQuality(aaQuality)
     if msaaQuality > 0 and msaaType == 0:
         gfxsettings.Set(gfxsettings.GFX_ANTI_ALIASING,
                         gfxsettings.AA_QUALITY_DISABLED,
                         pending=False)
     brightness = gfxsettings.Get(gfxsettings.GFX_BRIGHTNESS)
     trinity.settings.SetValue('eveSpaceSceneGammaBrightness', brightness)
コード例 #4
0
 def SetDevice(self, *args, **kwds):
     if blue.win32.IsTransgaming():
         ciderFullscreen = self.cider.GetFullscreen()
         self.ciderFullscreenLast = self.cider.GetFullscreen(apiCheck=True)
         if not self.deviceCreated and not ciderFullscreen:
             self.SetDeviceCiderStartup(*args, **kwds)
         elif ciderFullscreen:
             self.SetDeviceCiderFullscreen(*args, **kwds)
         else:
             self.SetDeviceCiderWindowed(*args, **kwds)
         self.deviceCreated = True
     else:
         DeviceMgr.SetDevice(self, *args, **kwds)
コード例 #5
0
 def GetAdapterResolutionsAndRefreshRates(self, set=None):
     options, resoptions = DeviceMgr.GetAdapterResolutionsAndRefreshRates(
         self, set)
     if set.Windowed:
         maxWidth = trinity.app.GetVirtualScreenWidth()
         maxHeight = trinity.app.GetVirtualScreenHeight()
         maxLabel = localization.GetByLabel(
             '/Carbon/UI/Service/Device/ScreenSize',
             width=maxWidth,
             height=maxHeight)
         maxOp = (maxLabel, (maxWidth, maxHeight))
         if maxOp not in options:
             options.append(maxOp)
     elif blue.sysinfo.isTransgaming and self.IsWindowed(set):
         width = trinity.app.GetVirtualScreenWidth()
         height = trinity.app.GetVirtualScreenHeight() - 44
         if height < trinity.app.minimumHeight:
             height = trinity.app.minimumHeight
         label = localization.GetByLabel(
             '/Carbon/UI/Service/Device/ScreenSize',
             width=width,
             height=height)
         op = (label, (width, height))
         if op not in options:
             options.append(op)
         width = width / 2
         if width < trinity.app.minimumWidth:
             width = trinity.app.minimumWidth
         label = localization.GetByLabel(
             '/Carbon/UI/Service/Device/ScreenSize',
             width=width,
             height=height)
         op = (label, (width, height))
         if op not in options:
             options.append(op)
     return (options, resoptions)
コード例 #6
0
 def CreateDevice(self):
     DeviceMgr.CreateDevice(self)
     if blue.sysinfo.isTransgaming:
         tgToggleEventHandler = blue.BlueEventToPython()
         tgToggleEventHandler.handler = self.ToggleWindowedTransGaming
         trinity.app.tgToggleEventListener = tgToggleEventHandler
コード例 #7
0
 def BackupSettings(self):
     DeviceMgr.BackupSettings(self)
     if blue.sysinfo.isTransgaming:
         self.ciderFullscreenBackup = self.ciderFullscreenLast
コード例 #8
0
 def SetDeviceCiderWindowed(self, *args, **kwds):
     self.cider.SetFullscreen(False)
     DeviceMgr.SetDevice(self, *args, **kwds)
コード例 #9
0
 def SetDeviceCiderFullscreen(self, *args, **kwds):
     DeviceMgr.SetDevice(self, *args, **kwds)
     self.cider.SetFullscreen(True)
コード例 #10
0
 def BackupSettings(self):
     DeviceMgr.BackupSettings(self)
     if blue.win32.IsTransgaming():
         self.ciderFullscreenBackup = self.ciderFullscreenLast