mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 10:17:17 +00:00
We must cast the return value of GetProcAddress.
This commit is contained in:
parent
9a36a2f2f0
commit
c583b68565
|
@ -341,7 +341,7 @@ LPWINE_DRIVER DRIVER_TryOpenDriver32(LPCSTR fn, LPARAM lParam2)
|
||||||
|
|
||||||
if ((hModule = LoadLibraryA(fn)) == 0) {cause = "Not a 32 bit lib"; goto exit;}
|
if ((hModule = LoadLibraryA(fn)) == 0) {cause = "Not a 32 bit lib"; goto exit;}
|
||||||
|
|
||||||
lpDrv->d.d32.lpDrvProc = GetProcAddress(hModule, "DriverProc");
|
lpDrv->d.d32.lpDrvProc = (DRIVERPROC)GetProcAddress(hModule, "DriverProc");
|
||||||
if (lpDrv->d.d32.lpDrvProc == NULL) {cause = "no DriverProc"; goto exit;}
|
if (lpDrv->d.d32.lpDrvProc == NULL) {cause = "no DriverProc"; goto exit;}
|
||||||
|
|
||||||
lpDrv->dwFlags = 0;
|
lpDrv->dwFlags = 0;
|
||||||
|
|
|
@ -23,7 +23,8 @@ static DDSURFACEDESC sdesc;
|
||||||
static LONG vga_polling,vga_refresh;
|
static LONG vga_polling,vga_refresh;
|
||||||
static HANDLE poll_timer;
|
static HANDLE poll_timer;
|
||||||
|
|
||||||
static HRESULT WINAPI (*pDirectDrawCreate)(LPGUID,LPDIRECTDRAW *,LPUNKNOWN);
|
typedef HRESULT WINAPI (*DirectDrawCreateProc)(LPGUID,LPDIRECTDRAW *,LPUNKNOWN);
|
||||||
|
static DirectDrawCreateProc pDirectDrawCreate;
|
||||||
|
|
||||||
static void VGA_DeinstallTimer(void)
|
static void VGA_DeinstallTimer(void)
|
||||||
{
|
{
|
||||||
|
@ -61,7 +62,7 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth)
|
||||||
if (!pDirectDrawCreate)
|
if (!pDirectDrawCreate)
|
||||||
{
|
{
|
||||||
HMODULE hmod = LoadLibraryA( "ddraw.dll" );
|
HMODULE hmod = LoadLibraryA( "ddraw.dll" );
|
||||||
if (hmod) pDirectDrawCreate = GetProcAddress( hmod, "DirectDrawCreate" );
|
if (hmod) pDirectDrawCreate = (DirectDrawCreateProc)GetProcAddress( hmod, "DirectDrawCreate" );
|
||||||
}
|
}
|
||||||
if (pDirectDrawCreate) pDirectDrawCreate(NULL,&lpddraw,NULL);
|
if (pDirectDrawCreate) pDirectDrawCreate(NULL,&lpddraw,NULL);
|
||||||
if (!lpddraw) {
|
if (!lpddraw) {
|
||||||
|
|
Loading…
Reference in a new issue