public bool b選曲リストフォントを斜体にする;\r
public bool b選曲リストフォントを太字にする;\r
public bool b全画面モード;\r
+ public int nウインドウwidth; // #23510 2010.10.31 yyagi add\r
+ public int nウインドウheight; // #23510 2010.10.31 yyagi add\r
public Dictionary<int, string> dicJoystick;\r
public ECYGroup eCYGroup;\r
public Eダークモード eDark;\r
this.str曲データ検索パス = @".\";\r
this.b全画面モード = false;\r
this.b垂直帰線待ちを行う = true;\r
+ this.nウインドウwidth = 640; // #23510 2010.10.31 yyagi add\r
+ this.nウインドウheight = 480; // \r
this._bGuitar有効 = true;\r
this._bDrums有効 = true;\r
this.nBGAlpha = 100;\r
sw.WriteLine( "; 画面モード(0:ウィンドウ, 1:全画面)" );\r
sw.WriteLine( "FullScreen={0}", this.b全画面モード ? 1 : 0 );\r
sw.WriteLine();\r
- sw.WriteLine( "; 垂直帰線同期(0:OFF,1:ON)" );\r
+\r
+ sw.WriteLine("; ウインドウモード時の画面幅"); // #23510 2010.10.31 yyagi add\r
+ sw.WriteLine("WindowWidth={0}", this.nウインドウwidth); //\r
+ sw.WriteLine(); //\r
+ sw.WriteLine("; ウインドウモード時の画面高さ"); //\r
+ sw.WriteLine("WindowHeight={0}", this.nウインドウheight); //\r
+ sw.WriteLine(); //\r
+\r
+ sw.WriteLine("; 垂直帰線同期(0:OFF,1:ON)");\r
sw.WriteLine( "VSyncWait={0}", this.b垂直帰線待ちを行う ? 1 : 0 );\r
sw.WriteLine();\r
sw.WriteLine( "; ギター/ベース有効(0:OFF,1:ON)" );\r
{\r
this.b全画面モード = C変換.bONorOFF( str4[ 0 ] );\r
}\r
- else if( str3.Equals( "VSyncWait" ) )\r
+ else if (str3.Equals("WindowWidth")) // #23510 2010.10.31 yyagi add\r
+ {\r
+ this.nウインドウwidth = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 1, 65535, this.nウインドウwidth);\r
+ if (this.nウインドウwidth <= 0)\r
+ {\r
+ this.nウインドウwidth = 640;\r
+ }\r
+ }\r
+ else if (str3.Equals("WindowHeight")) // #23510 2010.10.31 yyagi add\r
+ {\r
+ this.nウインドウheight = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 1, 65535, this.nウインドウheight);\r
+ if (this.nウインドウheight <= 0)\r
+ {\r
+ this.nウインドウheight = 480;\r
+ }\r
+ }\r
+ else if (str3.Equals("VSyncWait"))\r
{\r
this.b垂直帰線待ちを行う = C変換.bONorOFF( str4[ 0 ] );\r
}\r
if (ConfigIni.bウィンドウモード == false) // #23510 2010.10.27 yyagi: backup current window size before going fullscreen mode\r
{\r
currentClientSize = this.Window.ClientSize;\r
+ ConfigIni.nウインドウwidth = this.Window.ClientSize.Width;\r
+ ConfigIni.nウインドウheight = this.Window.ClientSize.Height;\r
}\r
// base.GraphicsDeviceManager.ToggleFullScreen();\r
base.GraphicsDeviceManager.ChangeDevice( settings );\r
#region [ ウィンドウ初期化 ]\r
//---------------------\r
base.Window.Text = "DTXMania .NET style release " + VERSION;\r
- base.Window.ClientSize = new Size( 640, 480 );\r
+ base.Window.ClientSize = new Size(ConfigIni.nウインドウwidth, ConfigIni.nウインドウheight); // #34510 yyagi 2010.10.31 to change window size got from Config.ini\r
base.Window.MaximizeBox = false;\r
base.Window.FormBorderStyle = FormBorderStyle.Sizable; // #23510 2010.10.27 yyagi: changed from FixedDialog to Sizable, to support window resize\r
base.Window.ShowIcon = true;\r
settings.EnableVSync = ConfigIni.b垂直帰線待ちを行う;\r
base.GraphicsDeviceManager.ChangeDevice( settings );\r
base.IsFixedTimeStep = false;\r
+ base.Window.ClientSize = new Size(ConfigIni.nウインドウwidth, ConfigIni.nウインドウheight); // #23510 2010.10.31 yyagi\r
//---------------------\r
#endregion\r
\r
Trace.Unindent();\r
}\r
Trace.TraceInformation( "Config.ini を出力します。" );\r
+ // #23510 2010.10.31 yyagi\r
+ // とりあえずここでConfigへの変数書き戻しを行っているが、\r
+ // 一段落したらリサイズイベントの処理中に入れ込んでしまう予定。\r
+ ConfigIni.nウインドウwidth = (base.Window.ClientSize.Width > 0) ? base.Window.ClientSize.Width : currentClientSize.Width; // #23510 2010.10.31 yyagi add\r
+ ConfigIni.nウインドウheight = (base.Window.ClientSize.Height > 0) ? base.Window.ClientSize.Height : currentClientSize.Height;\r
+Debug.WriteLine("width,height=" + base.Window.ClientSize.Width + " " + base.Window.ClientSize.Height);\r
string str = strEXEのあるフォルダ + "Config.ini";\r
Trace.Indent();\r
try\r
return;\r
newSettings.Direct3D9.AdapterOrdinal = adapterOrdinal;\r
\r
- CreateDevice( newSettings );\r
+ newSettings.BackBufferWidth = 0; // #23510 2010.11.1 add yyagi to avoid to reset to 640x480 for the first time in XP.\r
+ newSettings.BackBufferHeight = 0; //\r
+ newSettings.Direct3D9.PresentParameters.BackBufferWidth = 640; //\r
+ newSettings.Direct3D9.PresentParameters.BackBufferHeight = 480; //\r
+\r
+ CreateDevice(newSettings);\r
}\r
\r
void game_FrameEnd( object sender, EventArgs e )\r