mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
fix for intel pickbestsize
This commit is contained in:
parent
c3e20f1a70
commit
e95e5795e5
@ -2202,11 +2202,12 @@ bool wdxGraphicsWindow::search_for_device(LPDIRECT3D8 pD3D8,DXDeviceInfo *pDevIn
|
||||
|
||||
bool bCouldntFindValidZBuf;
|
||||
if(!_dxgsg->scrn.bIsLowVidMemCard) {
|
||||
if(dx_pick_best_screenres) {
|
||||
if((_dxgsg->scrn.MaxAvailVidMem == UNKNOWN_VIDMEM_SIZE) || is_badvidmem_card(&_dxgsg->scrn.DXDeviceID)) {
|
||||
wdxdisplay_cat.info() << "pick_best_screenres: defaulted 800x600 based on no reliable vidmem size\n";
|
||||
dwRenderWidth=800; dwRenderHeight=600;
|
||||
} else {
|
||||
|
||||
bool bUseDefaultSize=dx_pick_best_screenres&&
|
||||
((_dxgsg->scrn.MaxAvailVidMem == UNKNOWN_VIDMEM_SIZE) ||
|
||||
is_badvidmem_card(&_dxgsg->scrn.DXDeviceID));
|
||||
|
||||
if(dx_pick_best_screenres && !bUseDefaultSize) {
|
||||
typedef struct {
|
||||
UINT memlimit;
|
||||
DWORD scrnX,scrnY;
|
||||
@ -2246,15 +2247,20 @@ bool wdxGraphicsWindow::search_for_device(LPDIRECT3D8 pD3D8,DXDeviceInfo *pDevIn
|
||||
}
|
||||
}
|
||||
// otherwise just go with whatever was specified (we probably shouldve marked this card as lowmem if it gets to end of loop w/o breaking
|
||||
}
|
||||
}
|
||||
|
||||
if(pixFmt==D3DFMT_UNKNOWN) {
|
||||
|
||||
if(bUseDefaultSize) {
|
||||
wdxdisplay_cat.info() << "pick_best_screenres: defaulted 800x600 based on no reliable vidmem size\n";
|
||||
dwRenderWidth=800; dwRenderHeight=600;
|
||||
}
|
||||
|
||||
} else {
|
||||
search_for_valid_displaymode(dwRenderWidth,dwRenderHeight,bNeedZBuffer,bWantStencil,
|
||||
&_dxgsg->scrn.SupportedScreenDepthsMask,
|
||||
&bCouldntFindValidZBuf,
|
||||
&pixFmt);
|
||||
|
||||
|
||||
// note I'm not saving refresh rate, will just use adapter default at given res for now
|
||||
|
||||
if(pixFmt==D3DFMT_UNKNOWN) {
|
||||
@ -2954,6 +2960,19 @@ get_depth_bitwidth(void) {
|
||||
// return ddsd.ddpfPixelFormat.dwRGBBitCount;
|
||||
}
|
||||
|
||||
void wdxGraphicsWindow::
|
||||
get_framebuffer_format(PixelBuffer::Type &fb_type, PixelBuffer::Format &fb_format) {
|
||||
assert(_dxgsg!=NULL);
|
||||
|
||||
fb_type = PixelBuffer::T_unsigned_byte;
|
||||
// this is sortof incorrect, since for F_rgb5 it's really 5 bits per channel
|
||||
//would have to change a lot of texture stuff to make this correct though
|
||||
|
||||
if(IS_16BPP_DISPLAY_FORMAT(_dxgsg->scrn.PresParams.BackBufferFormat))
|
||||
fb_format = PixelBuffer::F_rgb5;
|
||||
else fb_format = PixelBuffer::F_rgb;
|
||||
}
|
||||
|
||||
// Global system parameters we want to modify during our run
|
||||
static int iMouseTrails;
|
||||
static bool bCursorShadowOn,bMouseVanish;
|
||||
|
@ -90,6 +90,7 @@ public:
|
||||
virtual bool resize(unsigned int xsize,unsigned int ysize);
|
||||
virtual unsigned int verify_window_sizes(unsigned int numsizes,unsigned int *dimen);
|
||||
virtual int get_depth_bitwidth(void);
|
||||
virtual void get_framebuffer_format(PixelBuffer::Type &fb_type, PixelBuffer::Format &fb_format);
|
||||
|
||||
protected:
|
||||
ButtonHandle lookup_key(WPARAM wparam) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user