#include "genesis.h"#include "ModeList.h"Go to the source code of this file.
Functions | |
| void | AutoSelect_SortDriverList (ModeList *DriverList, int ListLength) |
| geBoolean | AutoSelect_PickDriver (HWND hWnd, geEngine *Engine, ModeList *List, int ModeListLength, int *Selection) |
|
||||||||||||||||||||||||
|
Definition at line 83 of file AutoSelect.c. References Engine, ModeList::Evaluation, GameMgr_ResetMainWindow(), GE_FALSE, GE_TRUE, geBoolean, geEngine_SetDriverAndMode(), geErrorLog_AddString, ModeList::InAWindow, MODELIST_EVALUATED_OK, and NULL. Referenced by PickMode().
00084 {
00085 int i;
00086
00087 assert( Engine != NULL );
00088 assert( DriverList != NULL );
00089 assert( Selection != NULL );
00090
00091 for (i=0; i<ListLength; i++)
00092 {
00093 if (DriverList[i].Evaluation == MODELIST_EVALUATED_OK)
00094 {
00095 if (DriverList[i].InAWindow)
00096 {
00097 GameMgr_ResetMainWindow(hWnd, DriverList[i].Width, DriverList[i].Height);
00098 }
00099
00100 if (!geEngine_SetDriverAndMode(Engine, DriverList[i].Driver, DriverList[i].Mode))
00101 {
00102 geErrorLog_AddString(-1, "AutoSelect_ModeAndDriver: driver mode set failed. continuing. Driver:", DriverList[i].DriverNamePtr);
00103 geErrorLog_AddString(-1, "AutoSelect_ModeAndDriver: driver mode set failed. continuing. Mode:", DriverList[i].ModeNamePtr);
00104 }
00105 else
00106 {
00107 *Selection = i;
00108 return GE_TRUE;
00109 }
00110 }
00111 }
00112
00113 return GE_FALSE;
00114 }
|
|
||||||||||||
|
Definition at line 75 of file AutoSelect.c. References AutoSelect_Compare(). Referenced by WinMain().
00076 {
00077 qsort( DriverList, ListLength, sizeof( DriverList[0] ), AutoSelect_Compare );
00078 }
|
1.3.2