瀏覽代碼

Added support for -hi option.

Brucey 5 年之前
父節點
當前提交
45191b2eba
共有 2 個文件被更改,包括 25 次插入4 次删除
  1. 1 0
      default.language.ini
  2. 24 4
      maxide.bmx

+ 1 - 0
default.language.ini

@@ -298,6 +298,7 @@ menu_program_buildoptions_requireoverride    = "Require 'Override' declaration"
 menu_program_buildoptions_overrideerrors     = "Raise 'override' errors not warnings"
 menu_program_buildoptions_overrideerrors     = "Raise 'override' errors not warnings"
 menu_program_buildoptions_gdbdebug           = "GDB Debug Generation"
 menu_program_buildoptions_gdbdebug           = "GDB Debug Generation"
 menu_program_buildoptions_gprof              = "GProf Profiling"
 menu_program_buildoptions_gprof              = "GProf Profiling"
+menu_program_buildoptions_hires              = "High Resolution (HiDPI)"
 menu_program_lockbuildfile                   = "&Lock Build File"
 menu_program_lockbuildfile                   = "&Lock Build File"
 menu_program_unlockbuildfile                 = "&Unlock Build File"
 menu_program_unlockbuildfile                 = "&Unlock Build File"
 menu_program_gotobuildfile                   = "Goto Build File"
 menu_program_gotobuildfile                   = "Goto Build File"

+ 24 - 4
maxide.bmx

@@ -3,7 +3,7 @@
 ' BlitzMax native integrated development environment
 ' BlitzMax native integrated development environment
 
 
 ' Copyright (c) 2005-2014 Simon Armstrong, Blitz Research Limited
 ' Copyright (c) 2005-2014 Simon Armstrong, Blitz Research Limited
-' Copyright (c) 2015-2019 Bruce A Henderson
+' Copyright (c) 2015-2020 Bruce A Henderson
 
 
 ' Permission is hereby granted, free of charge, to any person obtaining a copy
 ' Permission is hereby granted, free of charge, to any person obtaining a copy
 ' of this software and associated documentation files (the "Software"), to deal
 ' of this software and associated documentation files (the "Software"), to deal
@@ -182,6 +182,8 @@ Const MENUREQUIREOVERRIDEENABLED=67
 Const MENUOVERRIDEERRORSENABLED=68
 Const MENUOVERRIDEERRORSENABLED=68
 Const MENUGPROFENABLED=69
 Const MENUGPROFENABLED=69
 
 
+Const MENUHIRESENABLED=170
+
 Const MENUAPPOPTIONS=70
 Const MENUAPPOPTIONS=70
 Const MENUCONSOLEENABLED=71
 Const MENUCONSOLEENABLED=71
 Const MENUGUIENABLED=72
 Const MENUGUIENABLED=72
@@ -5391,7 +5393,7 @@ Type TOpenCode Extends TToolPanel
 		Return True
 		Return True
 	End Method
 	End Method
 
 
-	Method BuildSource(quick,debug,threaded,consoleBuild,guiBuild,makelibBuild,run, verbose, quickscan, universal, warnover, gdbdebug, requireOverride, overrideError, useUPX:Int, gprof:Int, platform:String = Null, architecture:String = Null, appstub:String = Null)
+	Method BuildSource(quick,debug,threaded,consoleBuild,guiBuild,makelibBuild,run, verbose, quickscan, universal, warnover, gdbdebug, requireOverride, overrideError, useUPX:Int, gprof:Int, hires:Int, platform:String = Null, architecture:String = Null, appstub:String = Null)
 		Local cmd$,out$,arg$
 		Local cmd$,out$,arg$
 		If isbmx Or isc Or iscpp
 		If isbmx Or isc Or iscpp
 			cmd$=quote(host.bmkpath)
 			cmd$=quote(host.bmkpath)
@@ -5417,6 +5419,7 @@ Type TOpenCode Extends TToolPanel
 			'bmk requires "-override" to use "-overerr"
 			'bmk requires "-override" to use "-overerr"
 			If requireOverride And overrideError cmd :+ " -overerr"
 			If requireOverride And overrideError cmd :+ " -overerr"
 			If appstub And appstub <> "brl.appstub" cmd :+ " -b " + appstub
 			If appstub And appstub <> "brl.appstub" cmd :+ " -b " + appstub
+			If guiBuild And hires cmd$:+" -hi"
 
 
 			If platform cmd :+ " -l " + platform
 			If platform cmd :+ " -l " + platform
 			If architecture cmd :+ " -g " + architecture
 			If architecture cmd :+ " -g " + architecture
@@ -5525,9 +5528,9 @@ Type TOpenCode Extends TToolPanel
 			Case TOOLREPLACE
 			Case TOOLREPLACE
 				Return FindReplace(String(argument))
 				Return FindReplace(String(argument))
 			Case TOOLBUILD
 			Case TOOLBUILD
-				BuildSource host.quickenabled,host.debugenabled,host.threadedenabled,host.consoleenabled, host.guienabled, host.makelibenabled,False, host.verboseenabled, host.quickscanenabled, host.universalenabled, host.warnoverenabled, host.gdbdebugenabled, host.requireOverrideEnabled, host.overrideErrorsEnabled, host.upxEnabled, host.gprofenabled, host.GetPlatform(), host.GetArchitecture(), host.selectedappstub
+				BuildSource host.quickenabled,host.debugenabled,host.threadedenabled,host.consoleenabled, host.guienabled, host.makelibenabled,False, host.verboseenabled, host.quickscanenabled, host.universalenabled, host.warnoverenabled, host.gdbdebugenabled, host.requireOverrideEnabled, host.overrideErrorsEnabled, host.upxEnabled, host.gprofenabled, host.hiresenabled, host.GetPlatform(), host.GetArchitecture(), host.selectedappstub
 			Case TOOLRUN
 			Case TOOLRUN
-				BuildSource host.quickenabled,host.debugenabled,host.threadedenabled,host.consoleenabled, host.guienabled, host.makelibenabled,True, host.verboseenabled, host.quickscanenabled, host.universalenabled, host.warnoverenabled, host.gdbdebugenabled, host.requireOverrideEnabled, host.overrideErrorsEnabled, host.upxEnabled, host.gprofenabled, host.GetPlatform(), host.GetArchitecture(), host.selectedappstub
+				BuildSource host.quickenabled,host.debugenabled,host.threadedenabled,host.consoleenabled, host.guienabled, host.makelibenabled,True, host.verboseenabled, host.quickscanenabled, host.universalenabled, host.warnoverenabled, host.gdbdebugenabled, host.requireOverrideEnabled, host.overrideErrorsEnabled, host.upxEnabled, host.gprofenabled, host.hiresenabled, host.GetPlatform(), host.GetArchitecture(), host.selectedappstub
 			Case TOOLLOCK
 			Case TOOLLOCK
 				SetLocked True
 				SetLocked True
 			Case TOOLUNLOCK
 			Case TOOLUNLOCK
@@ -5796,6 +5799,7 @@ Type TCodePlay
 	Field requireOverrideEnable:TGadget,requireOverrideEnabled		'menu,state
 	Field requireOverrideEnable:TGadget,requireOverrideEnabled		'menu,state
 	Field overrideErrorsEnable:TGadget,overrideErrorsEnabled		'menu,state
 	Field overrideErrorsEnable:TGadget,overrideErrorsEnabled		'menu,state
 	Field gprofenable:TGadget,gprofenabled		'menu,state
 	Field gprofenable:TGadget,gprofenabled		'menu,state
+	Field hiresenable:TGadget,hiresenabled		'menu,state
 	Field lockBuildMenuItem:TGadget
 	Field lockBuildMenuItem:TGadget
 	Field unlockBuildMenuItem:TGadget
 	Field unlockBuildMenuItem:TGadget
 	Field gotoBuildMenuItem:TGadget
 	Field gotoBuildMenuItem:TGadget
@@ -5956,6 +5960,7 @@ Type TCodePlay
 		requireOverrideEnabled=False
 		requireOverrideEnabled=False
 		overrideErrorsEnabled=False
 		overrideErrorsEnabled=False
 		gprofenabled=False
 		gprofenabled=False
+		hiresenabled=True
 		For Local i:Int = 0 Until platformenabled.length
 		For Local i:Int = 0 Until platformenabled.length
 			platformenabled[i] = False
 			platformenabled[i] = False
 		Next
 		Next
@@ -6031,6 +6036,8 @@ Type TCodePlay
 					overrideErrorsEnabled=Int(b$)
 					overrideErrorsEnabled=Int(b$)
 				Case "prg_gprof"
 				Case "prg_gprof"
 					gprofenabled=Int(b$)
 					gprofenabled=Int(b$)
+				Case "prg_hires"
+					hiresenabled=Int(b$)
 				Case "prg_platform"
 				Case "prg_platform"
 					For Local i:Int = 0 Until platformenabled.length
 					For Local i:Int = 0 Until platformenabled.length
 						platformenabled[i] = False
 						platformenabled[i] = False
@@ -6102,6 +6109,7 @@ Type TCodePlay
 		stream.WriteLine "prg_requireoverride="+requireOverrideEnabled
 		stream.WriteLine "prg_requireoverride="+requireOverrideEnabled
 		stream.WriteLine "prg_overrideerrors="+overrideErrorsEnabled
 		stream.WriteLine "prg_overrideerrors="+overrideErrorsEnabled
 		stream.WriteLine "prg_gprof="+gprofenabled
 		stream.WriteLine "prg_gprof="+gprofenabled
+		stream.WriteLine "prg_hires="+hiresenabled
 		For Local i:Int = 0 Until platformenabled.length
 		For Local i:Int = 0 Until platformenabled.length
 			If platformenabled[i] Then
 			If platformenabled[i] Then
 				stream.WriteLine "prg_platform=" + i
 				stream.WriteLine "prg_platform=" + i
@@ -7054,6 +7062,7 @@ Type TCodePlay
 		warnoverenable=CreateMenu("{{menu_program_buildoptions_warnover}}",MENUWARNOVERENABLED,buildoptions)
 		warnoverenable=CreateMenu("{{menu_program_buildoptions_warnover}}",MENUWARNOVERENABLED,buildoptions)
 		requireOverrideEnable=CreateMenu("{{menu_program_buildoptions_requireoverride}}",MENUREQUIREOVERRIDEENABLED,buildoptions)
 		requireOverrideEnable=CreateMenu("{{menu_program_buildoptions_requireoverride}}",MENUREQUIREOVERRIDEENABLED,buildoptions)
 		overrideErrorsEnable=CreateMenu("{{menu_program_buildoptions_overrideerrors}}",MENUOVERRIDEERRORSENABLED,buildoptions)
 		overrideErrorsEnable=CreateMenu("{{menu_program_buildoptions_overrideerrors}}",MENUOVERRIDEERRORSENABLED,buildoptions)
+		hiresEnable=CreateMenu("{{menu_program_buildoptions_hires}}",MENUHIRESENABLED,buildoptions)
 
 
 		platform=CreateMenu("{{menu_program_platform}}",0,program)
 		platform=CreateMenu("{{menu_program_platform}}",0,program)
 ?Not raspberrypi
 ?Not raspberrypi
@@ -7132,6 +7141,7 @@ Type TCodePlay
 		If requireOverrideEnabled CheckMenu requireOverrideEnable
 		If requireOverrideEnabled CheckMenu requireOverrideEnable
 		If overrideErrorsEnabled CheckMenu overrideErrorsEnable
 		If overrideErrorsEnabled CheckMenu overrideErrorsEnable
 		If gprofenabled CheckMenu gprofenable
 		If gprofenabled CheckMenu gprofenable
+		If hiresenabled CheckMenu hiresenable
 		'need to do this below "CheckMenu" as it automatically enables
 		'need to do this below "CheckMenu" as it automatically enables
 		'the menu (again)
 		'the menu (again)
 		If Not requireOverrideEnabled DisableMenu overrideErrorsEnable
 		If Not requireOverrideEnabled DisableMenu overrideErrorsEnable
@@ -7483,6 +7493,16 @@ Type TCodePlay
 				EndIf
 				EndIf
 				UpdateWindowMenu window
 				UpdateWindowMenu window
 
 
+			Case MENUHIRESENABLED
+				If hiresenabled
+					hiresenabled=False
+					UncheckMenu hiresenable
+				Else
+					hiresenabled=True
+					CheckMenu hiresenable
+				EndIf
+				UpdateWindowMenu window
+
 			Case MENUGDBDEBUGENABLED
 			Case MENUGDBDEBUGENABLED
 				If gdbdebugenabled
 				If gdbdebugenabled
 					gdbdebugenabled=False
 					gdbdebugenabled=False