summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-03-13 16:48:52 +0000
committerfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-03-13 16:48:52 +0000
commit2810b67b3523ade20e841066205722a9c9e34963 (patch)
tree304f6c23a4dcbfef8d3be7ce8d58302648245fe8 /libvo
parent89af98f42bd820caeed3b26e92faf97257d49e89 (diff)
downloadmpv-2810b67b3523ade20e841066205722a9c9e34963.tar.bz2
mpv-2810b67b3523ade20e841066205722a9c9e34963.tar.xz
move refreshrate and adapter_num variables to video_out because they might be usefull for other drivers, too
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12022 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/video_out.c2
-rw-r--r--libvo/video_out.h2
-rw-r--r--libvo/vo_directx.c14
3 files changed, 10 insertions, 8 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 33aa944f5d..c05c84b86f 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -41,6 +41,8 @@ int vo_fs = 0;
int vo_fsmode = 0;
float vo_panscan = 0.0f;
int vo_ontop = 0;
+int vo_adapter_num=0;
+int vo_refresh_rate=0;
int vo_pts=0; // for hw decoding
float vo_fps=0; // for mp1e rte
diff --git a/libvo/video_out.h b/libvo/video_out.h
index c4a476c5d0..3f5dbc9124 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -196,6 +196,8 @@ extern int vo_vsync;
extern int vo_fs;
extern int vo_fsmode;
extern float vo_panscan;
+extern int vo_adapter_num;
+extern int vo_refresh_rate;
extern int vo_gamma_brightness;
extern int vo_gamma_saturation;
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 157b6a812e..fba987ddf6 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -58,8 +58,6 @@ static uint32_t dstride; //surface stride
static uint32_t nooverlay = 0; //NonOverlay mode
static DWORD destcolorkey; //colorkey for our surface
static COLORREF windowcolor = RGB(0,0,16); //windowcolor == colorkey
-int adapter_num=0;
-int refresh_rate=0;
static int adapter_count=0;
static GUID selected_guid;
static GUID *selected_guid_ptr = NULL;
@@ -180,7 +178,7 @@ static uint32_t Directx_CreatePrimarySurface()
if(g_lpddsPrimary)g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary);
g_lpddsPrimary=NULL;
- if(vidmode)g_lpdd->lpVtbl->SetDisplayMode(g_lpdd,vm_width,vm_height,vm_bpp,refresh_rate,0);
+ if(vidmode)g_lpdd->lpVtbl->SetDisplayMode(g_lpdd,vm_width,vm_height,vm_bpp,vo_refresh_rate,0);
ZeroMemory(&ddsd, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
//set flags and create a primary surface.
@@ -346,7 +344,7 @@ static BOOL WINAPI EnumCallbackEx(GUID FAR *lpGUID, LPSTR lpDriverDescription, L
mp_msg(MSGT_VO, MSGL_INFO ,"%s", lpDriverDescription);
}
- if(adapter_count == adapter_num){
+ if(adapter_count == vo_adapter_num){
if (!lpGUID)
selected_guid_ptr = NULL;
else
@@ -380,7 +378,7 @@ static uint32_t Directx_InitDirectDraw()
return 1;
}
- if(adapter_num){ //display other than default
+ if(vo_adapter_num){ //display other than default
OurDirectDrawEnumerateEx = (LPDIRECTDRAWENUMERATEEX) GetProcAddress(hddraw_dll,"DirectDrawEnumerateExA");
if (!OurDirectDrawEnumerateEx){
FreeLibrary( hddraw_dll );
@@ -393,8 +391,8 @@ static uint32_t Directx_InitDirectDraw()
// enumerate all display devices attached to the desktop
OurDirectDrawEnumerateEx(EnumCallbackEx, NULL, DDENUM_ATTACHEDSECONDARYDEVICES );
- if(adapter_num >= adapter_count)
- mp_msg(MSGT_VO, MSGL_ERR,"Selected adapter (%d) doesn't exist: Default Display Adapter selected\n",adapter_num);
+ if(vo_adapter_num >= adapter_count)
+ mp_msg(MSGT_VO, MSGL_ERR,"Selected adapter (%d) doesn't exist: Default Display Adapter selected\n",vo_adapter_num);
}
OurDirectDrawCreateEx = (void *)GetProcAddress(hddraw_dll, "DirectDrawCreateEx");
@@ -446,7 +444,7 @@ static uint32_t Directx_InitDirectDraw()
mp_msg(MSGT_VO, MSGL_FATAL,"<vo_directx><FATAL ERROR>can't set displaymode\n");
return 1;
}
- mp_msg(MSGT_VO, MSGL_V,"<vo_directx><INFO>Inited adapter %i for %i x %i @ %i \n",adapter_num,vm_width,vm_height,vm_bpp);
+ mp_msg(MSGT_VO, MSGL_V,"<vo_directx><INFO>Inited adapter %i for %i x %i @ %i \n",vo_adapter_num,vm_width,vm_height,vm_bpp);
return 0;
}
if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, hWnd, DDSCL_NORMAL) != DD_OK) // or DDSCL_SETFOCUSWINDOW