OSDN Git Service

#34763 x64での動作時、CPUコア数が異常な値となり、(CPUコア数と同じ数だけ確保する)サウンド更新スレッド数が異常になっていたのを修正。
authoryyagi <yyagi.dtxmania@gmail.com>
Mon, 17 Jun 2019 16:31:06 +0000 (01:31 +0900)
committeryyagi <yyagi.dtxmania@gmail.com>
Mon, 17 Jun 2019 16:31:06 +0000 (01:31 +0900)
DTXMania/コード/スコア、曲/CDTX.cs
FDK/コード/00.共通/CWin32.cs
FDK/コード/03.サウンド/CSound.cs

index 9f0bf4e..107c049 100644 (file)
@@ -373,7 +373,7 @@ namespace DTXMania
                {
                        #region [ CPUコア数の取得 ]
                        CWin32.SYSTEM_INFO sysInfo = new CWin32.SYSTEM_INFO();
-                       CWin32.GetSystemInfo(ref sysInfo);
+                       CWin32.GetSystemInfo(out sysInfo);
                        int nCPUCores = (int)sysInfo.dwNumberOfProcessors;
                        #endregion
                        #region [ BMP読み込み ]
index d6aa311..3f0a2e1 100644 (file)
@@ -383,7 +383,7 @@ namespace FDK
                [DllImport( "user32.dll", CharSet = CharSet.Auto, SetLastError = true )]
                public static extern bool SystemParametersInfo( uint uiAction, uint uiParam, IntPtr pvParam, uint fWinIni );
                [DllImport( "kernel32.dll" )]
-               public static extern void GetSystemInfo( ref SYSTEM_INFO ptmpsi );
+               public static extern void GetSystemInfo( out SYSTEM_INFO ptmpsi );
                [DllImport( "kernel32.dll" )]
                internal static extern ExecutionState SetThreadExecutionState( ExecutionState esFlags );
 
@@ -521,14 +521,14 @@ namespace FDK
                {
                        public uint dwOemId;
                        public uint dwPageSize;
-                       public uint lpMinimumApplicationAddress;
-                       public uint lpMaximumApplicationAddress;
-                       public uint dwActiveProcessorMask;
+                       public IntPtr lpMinimumApplicationAddress;
+                       public IntPtr lpMaximumApplicationAddress;
+                       public IntPtr dwActiveProcessorMask;
                        public uint dwNumberOfProcessors;
                        public uint dwProcessorType;
                        public uint dwAllocationGranularity;
-                       public uint dwProcessorLevel;
-                       public uint dwProcessorRevision;
+                       public ushort dwProcessorLevel;
+                       public ushort dwProcessorRevision;
                }
                public struct BATTERY_REPORTING_SCALE
                {
index 49e462e..c5aeec3 100644 (file)
@@ -359,7 +359,7 @@ namespace FDK
                        {
                                #region [ CPU論理コア数の取得 (HT含む) ]
                                CWin32.SYSTEM_INFO sysInfo = new CWin32.SYSTEM_INFO();
-                               CWin32.GetSystemInfo(ref sysInfo);
+                               CWin32.GetSystemInfo(out sysInfo);
                                int nCPUCores = (int)sysInfo.dwNumberOfProcessors;
                                #endregion