mirror of
https://github.com/vivier/EMILE.git
synced 2024-05-28 13:41:30 +00:00
Add GetCurrentMode()
This commit is contained in:
parent
b1eeb789a0
commit
d356dd3a53
|
@ -1,11 +1,16 @@
|
|||
/*
|
||||
*
|
||||
* (c) 2004,2005 Laurent Vivier <Laurent@lvivier.info>
|
||||
* (c) 2004-2007 Laurent Vivier <Laurent@lvivier.info>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MACOS_VIDEO_H__
|
||||
#define __MACOS_VIDEO_H__
|
||||
|
||||
#include <string.h>
|
||||
#include <macos/files.h>
|
||||
#include <macos/devices.h>
|
||||
|
||||
typedef struct VDFlagRec
|
||||
{
|
||||
char flag;
|
||||
|
@ -20,4 +25,30 @@ typedef struct VDParamBlock
|
|||
void* csParam;
|
||||
} VDParamBlock;
|
||||
typedef VDParamBlock *VDParamBlockPtr;
|
||||
|
||||
typedef struct VDSwitchInfoRec {
|
||||
unsigned short csMode;
|
||||
unsigned long csData;
|
||||
unsigned short csPage;
|
||||
void* csBaseAddr;
|
||||
unsigned long csReserved;
|
||||
} VDSwitchInfoRec;
|
||||
|
||||
enum {
|
||||
cscGetCurMode = 10,
|
||||
};
|
||||
|
||||
static inline OSErr GetCurrentMode(short refNum, VDSwitchInfoRec *hwMode)
|
||||
{
|
||||
CntrlParam param;
|
||||
|
||||
memset(¶m, 0, sizeof(param));
|
||||
memset(hwMode, 0, sizeof(hwMode));
|
||||
|
||||
param.csCode = cscGetCurMode;
|
||||
param.ioCRefNum = refNum;
|
||||
*((VDSwitchInfoRec **)¶m.csParam[0]) = hwMode;
|
||||
|
||||
return PBStatusSync((ParmBlkPtr)¶m);
|
||||
}
|
||||
#endif /* __MACOS_VIDEO_H__ */
|
||||
|
|
Loading…
Reference in New Issue
Block a user