mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
Removed DX7 references
This commit is contained in:
parent
26e87e17a3
commit
759767f9ce
@ -13,7 +13,7 @@
|
||||
#define LOCAL_LIBS \
|
||||
display putil
|
||||
|
||||
#define COMBINED_SOURCES $[TARGET]_composite1.cxx winDetectDx9.cxx winDetectDx8.cxx winDetectDx7.cxx
|
||||
#define COMBINED_SOURCES $[TARGET]_composite1.cxx winDetectDx9.cxx winDetectDx8.cxx
|
||||
|
||||
#define SOURCES \
|
||||
config_windisplay.h \
|
||||
@ -30,7 +30,7 @@
|
||||
#define INCLUDED_SOURCES \
|
||||
config_windisplay.cxx winGraphicsPipe.cxx \
|
||||
winGraphicsWindow.cxx \
|
||||
winDetectDx9.cxx winDetectDx8.cxx winDetectDx7.cxx
|
||||
winDetectDx9.cxx winDetectDx8.cxx
|
||||
|
||||
#define WIN_SYS_LIBS Imm32.lib winmm.lib kernel32.lib oldnames.lib user32.lib gdi32.lib
|
||||
|
||||
|
@ -1,79 +0,0 @@
|
||||
// Filename: winDetectDx7.h
|
||||
// Created by: aignacio (18Jan07)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2007, Disney Enterprises, Inc. All rights
|
||||
// reserved.
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
// along with this source code; you will also find a current copy of
|
||||
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
||||
//
|
||||
// To contact the maintainers of this program write to
|
||||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "pandabase.h"
|
||||
|
||||
#if HAVE_DX
|
||||
|
||||
#include <ddraw.h>
|
||||
|
||||
#include "graphicsStateGuardian.h"
|
||||
#include "graphicsPipe.h"
|
||||
#include "displaySearchParameters.h"
|
||||
|
||||
|
||||
typedef HRESULT (WINAPI *DIRECTDRAWCREATEEX) (GUID FAR * lpGuid, LPVOID *lplpDD, REFIID iid, IUnknown FAR *pUnkOuter);
|
||||
|
||||
static GUID REFIID_IDirectDraw7 = { 0x15e65ec0, 0x3b9c, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b };
|
||||
|
||||
int dx7_display_information (DisplaySearchParameters &display_search_parameters, DisplayInformation *display_information) {
|
||||
int debug = false;
|
||||
int state;
|
||||
|
||||
HMODULE ddraw_dll;
|
||||
LPDIRECTDRAW7 direct_draw;
|
||||
DDSCAPS2 dds_caps;
|
||||
DWORD total_video_memory;
|
||||
DWORD free_video_memory;
|
||||
HRESULT hr;
|
||||
|
||||
state = false;
|
||||
ddraw_dll = LoadLibrary ("ddraw.dll");
|
||||
if (ddraw_dll) {
|
||||
DIRECTDRAWCREATEEX DirectDrawCreateEx;
|
||||
|
||||
DirectDrawCreateEx = (DIRECTDRAWCREATEEX) GetProcAddress (ddraw_dll, "DirectDrawCreateEx");
|
||||
if (DirectDrawCreateEx) {
|
||||
hr = DirectDrawCreateEx (NULL, (LPVOID *) &direct_draw, REFIID_IDirectDraw7, NULL);
|
||||
if (hr == DD_OK) {
|
||||
hr = direct_draw -> QueryInterface (REFIID_IDirectDraw7, (LPVOID *)&direct_draw);
|
||||
if (hr == DD_OK) {
|
||||
ZeroMemory (&dds_caps, sizeof (DDSCAPS2));
|
||||
dds_caps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM;
|
||||
hr = direct_draw -> GetAvailableVidMem (&dds_caps, &total_video_memory, &free_video_memory);
|
||||
if (hr == DD_OK) {
|
||||
display_information -> _video_memory = total_video_memory;
|
||||
if (debug) {
|
||||
printf ("video_memory %d \n", total_video_memory);
|
||||
}
|
||||
|
||||
state = true;
|
||||
}
|
||||
|
||||
direct_draw -> Release ( );
|
||||
}
|
||||
}
|
||||
}
|
||||
FreeLibrary (ddraw_dll);
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
#endif
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "pandabase.h"
|
||||
|
||||
#if HAVE_DX
|
||||
#if HAVE_DX8
|
||||
|
||||
#include <d3d8.h>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "pandabase.h"
|
||||
|
||||
#if HAVE_DX
|
||||
#if HAVE_DX9
|
||||
|
||||
#include <d3d9.h>
|
||||
|
||||
|
@ -42,27 +42,21 @@ WinGraphicsPipe() {
|
||||
(PFN_TRACKMOUSEEVENT)GetProcAddress(_hUser32, "TrackMouseEvent");
|
||||
}
|
||||
|
||||
#if HAVE_DX
|
||||
int dx7_display_information (DisplaySearchParameters &display_search_parameters, DisplayInformation *display_information);
|
||||
int dx8_display_information (DisplaySearchParameters &display_search_parameters, DisplayInformation *display_information);
|
||||
int dx9_display_information (DisplaySearchParameters &display_search_parameters, DisplayInformation *display_information);
|
||||
#if HAVE_DX9
|
||||
DisplaySearchParameters display_search_parameters_dx9;
|
||||
int dx9_display_information (DisplaySearchParameters &display_search_parameters_dx9, DisplayInformation *display_information);
|
||||
|
||||
DisplaySearchParameters display_search_parameters;
|
||||
|
||||
// DX7
|
||||
if (dx7_display_information (display_search_parameters, _display_information)) {
|
||||
if (dx9_display_information (display_search_parameters_dx9, _display_information)) {
|
||||
|
||||
}
|
||||
|
||||
// try DX9 first
|
||||
if (dx9_display_information (display_search_parameters, _display_information)) {
|
||||
|
||||
}
|
||||
else {
|
||||
// DX9 failed, try DX8
|
||||
if (dx8_display_information (display_search_parameters, _display_information)) {
|
||||
#endif
|
||||
|
||||
}
|
||||
#if HAVE_DX8
|
||||
DisplaySearchParameters display_search_parameters_dx8;
|
||||
int dx8_display_information (DisplaySearchParameters &display_search_parameters_dx8, DisplayInformation *display_information);
|
||||
|
||||
if (dx8_display_information (display_search_parameters_dx8, _display_information)) {
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user