diff options
author | sr55 <[email protected]> | 2008-08-09 18:59:33 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-08-09 18:59:33 +0000 |
commit | 4be456c1c6b177a1774a8c998d3ac39c94292057 (patch) | |
tree | cf3a70f260d81ea9494d6a35b780499a9187b085 /win/C#/Program.cs | |
parent | e5bfe9599b4f572c43f8508199f2731e58edec5c (diff) |
WinGui:
- Added Memory and screen bounds to the activity log.
- Removed some x264 code from frmMain. The x264 widgets are now populated from the designer file.
- Removed some duplicate code from x264Panel.cs
- Added the macgui's animate function to x264Panel.cs
- Setup the Audio panel to default the sample rate to audio on audio track change.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1621 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Program.cs')
-rw-r--r-- | win/C#/Program.cs | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs index 605195703..ae9edec6f 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -47,9 +47,9 @@ namespace Handbrake }
// Make sure the system has enough RAM. 384MB or greater
- uint memory = MemoryCheck.CheckMemeory();
- memory = memory / 1024 / 1024;
-
+ Functions.SystemInfo info = new Functions.SystemInfo();
+ uint memory = info.TotalPhysicalMemory();
+
if (memory < 256)
{
MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n Insufficient RAM. 384MB or greater required. You have: " + memory.ToString() + "MB", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
@@ -75,37 +75,4 @@ namespace Handbrake }
}
- class MemoryCheck
- {
- public struct MEMORYSTATUS
- {
- public UInt32 dwLength;
- public UInt32 dwMemoryLoad;
- public UInt32 dwTotalPhys; // Used
- public UInt32 dwAvailPhys;
- public UInt32 dwTotalPageFile;
- public UInt32 dwAvailPageFile;
- public UInt32 dwTotalVirtual;
- public UInt32 dwAvailVirtual;
- // Aditional Varibles left in for future usage (JIC)
- }
-
- [DllImport("kernel32.dll")]
- public static extern void GlobalMemoryStatus
- (
- ref MEMORYSTATUS lpBuffer
- );
-
- public static uint CheckMemeory()
- {
- // Call the native GlobalMemoryStatus method
- // with the defined structure.
- MEMORYSTATUS memStatus = new MEMORYSTATUS();
- GlobalMemoryStatus(ref memStatus);
-
- uint MemoryInfo = memStatus.dwTotalPhys;
-
- return MemoryInfo;
- }
- }
}
\ No newline at end of file |