Jump to content
  • Advertisement
Sign in to follow this  
Ying

Figuring out system specs.

This topic is 3769 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How does one figure out the system specs of the machine the game is running on? I mean memory, processor, gfx card... I'm sure there must be some pretty standard way of doing it, but google doesn't seem too willing to lend a hand on the matter. For my specific problem, it's for making a logging library, with no external dependencies, so no directx, opengl or any such libraries help me out, as I'm aiming for something lightweigh and portable. And working in C++. For now it's sufficient that it works on windows. Thanks in advance to anyone who can answer me! -- Ying

Share this post


Link to post
Share on other sites
Advertisement
quick and easy way.

Download 3d mark. it will tell you. or goto control pannel->system->hardware->Device manager

for a quick spec goto mycomputer and right click and properties

Share this post


Link to post
Share on other sites
I guess he meant programatically getting the system specs...
I don't know of a standard way in C++, I think you will have to dig through OS specific APIs to find what you need. Good luck

Share this post


Link to post
Share on other sites
You can forget about it being portable. Any approach would be platform specific.

For instance, in windows you can use GetSystemInfo() to get Number of, Brand, and Type of installed processors.

For this and more, take a look at Windows' System Information Functions.

Available video memory could be obtained through DirectX, e.g., IDirect3DDevice9::GetAvailableTextureMem(), or maybe there's a generic Win32 function for that as well.

Share this post


Link to post
Share on other sites
Didn't valve make something like this available as part of their Steamworks SDK or something? I'm pretty sure they've made the engine they use to perform their hardware surveys available in some way.

Share this post


Link to post
Share on other sites
Thanks everyone for your feedback!
I'll have a look at the windows specific functions Mike, and the link to the files of your SysID_rev22 lib is down Rick.

Thanks again everyone!

Share this post


Link to post
Share on other sites
You can use "dxdiag". If you go to start run, you'll now what I mean (if never used it before).

So what you can do, is have your application run that, and print it to a txt file. From there you can search for "CPU Speed:" and the grab the numbers after that etc.

Share this post


Link to post
Share on other sites
Quote:
Original post by dpadam450
You can use "dxdiag". If you go to start run, you'll now what I mean (if never used it before).

So what you can do, is have your application run that, and print it to a txt file. From there you can search for "CPU Speed:" and the grab the numbers after that etc.


Now THATS the info i was looking for! But exactly how do i extract the info in the dxdiag application to a txt file? And I've been playing arround with it and, at least in vista the thing is REALLY slow, takes several seconds of the specs to load, and another extra 3 seconds or so to print them using the "save info" button on the app. Not the best idea for a game log which might crash in milliseconds.

I'd appreciate more info on the matter! Thanks!

Share this post


Link to post
Share on other sites
I would think twice about the dxdiag approach (dxdiag /t specs.txt), TBH. It's slow (like you said) and requires a temporary file for something that should be able to be obtained programmatically, and it requires you to parse a text file, that might change format between revisions.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!