2003-11-03 17:22:45 +01:00
|
|
|
// system detect
|
|
|
|
//
|
|
|
|
// Copyright (c) 2003 Jan Wassenberg
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License as
|
|
|
|
// published by the Free Software Foundation; either version 2 of the
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful, but
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// General Public License for more details.
|
|
|
|
//
|
|
|
|
// Contact info:
|
|
|
|
// Jan.Wassenberg@stud.uni-karlsruhe.de
|
|
|
|
// http://www.stud.uni-karlsruhe.de/~urkt/
|
|
|
|
|
|
|
|
#ifndef __DETECT_H__
|
|
|
|
#define __DETECT_H__
|
|
|
|
|
2004-06-01 19:34:12 +02:00
|
|
|
#include "lib.h"
|
2003-11-03 17:22:45 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// useful for choosing a video mode. not called by detect().
|
2004-05-06 19:14:30 +02:00
|
|
|
// if we fail, outputs are unchanged (assumed initialized to defaults)
|
2004-06-01 19:34:12 +02:00
|
|
|
extern int get_cur_vmode(int* xres, int* yres, int* bpp, int* freq);
|
2004-05-06 19:14:30 +02:00
|
|
|
|
|
|
|
// useful for determining aspect ratio. not called by detect().
|
|
|
|
// if we fail, outputs are unchanged (assumed initialized to defaults)
|
2004-05-08 03:11:51 +02:00
|
|
|
extern int get_monitor_size(int& width_mm, int& height_mm);
|
2004-05-06 19:14:30 +02:00
|
|
|
|
2003-11-03 17:22:45 +01:00
|
|
|
|
|
|
|
|
2004-05-26 01:16:21 +02:00
|
|
|
extern char gfx_card[64]; // default: ""
|
|
|
|
extern char gfx_drv_ver[64]; // default: ""
|
2003-11-03 17:22:45 +01:00
|
|
|
|
|
|
|
// attempt to detect graphics card without OpenGL (in case ogl init fails,
|
|
|
|
// or we want more detailed info). gfx_card[] is unchanged on failure.
|
2004-03-03 01:44:06 +01:00
|
|
|
extern void get_gfx_info();
|
2003-11-03 17:22:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// mem
|
|
|
|
//
|
|
|
|
|
|
|
|
extern size_t tot_mem;
|
|
|
|
extern size_t avl_mem;
|
|
|
|
|
|
|
|
// updates *_mem above
|
|
|
|
extern void get_mem_status();
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// CPU
|
|
|
|
//
|
|
|
|
|
|
|
|
extern char cpu_type[];
|
|
|
|
extern double cpu_freq;
|
|
|
|
|
|
|
|
// -1 if detect not yet called, or cannot be determined
|
|
|
|
extern int cpus;
|
2004-03-03 01:44:06 +01:00
|
|
|
extern int cpu_speedstep;
|
2003-11-03 17:22:45 +01:00
|
|
|
|
|
|
|
extern void detect();
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // #ifndef __DETECT_H__
|