54 |
REG_GET_N("Supported_4CC", g_config.supported_4cc, 0) |
REG_GET_N("Supported_4CC", g_config.supported_4cc, 0) |
55 |
REG_GET_N("Videoinfo_Compat", g_config.videoinfo_compat, 0) |
REG_GET_N("Videoinfo_Compat", g_config.videoinfo_compat, 0) |
56 |
REG_GET_N("Decoder_Aspect_Ratio", g_config.aspect_ratio, 0) |
REG_GET_N("Decoder_Aspect_Ratio", g_config.aspect_ratio, 0) |
57 |
|
REG_GET_N("num_threads", g_config.num_threads, 0) |
58 |
|
REG_GET_N("cpu_flags", g_config.cpu, 0) |
59 |
|
|
60 |
RegCloseKey(hKey); |
RegCloseKey(hKey); |
61 |
} |
} |
91 |
REG_SET_N("Supported_4CC", g_config.supported_4cc); |
REG_SET_N("Supported_4CC", g_config.supported_4cc); |
92 |
REG_SET_N("Videoinfo_Compat", g_config.videoinfo_compat); |
REG_SET_N("Videoinfo_Compat", g_config.videoinfo_compat); |
93 |
REG_SET_N("Decoder_Aspect_Ratio", g_config.aspect_ratio); |
REG_SET_N("Decoder_Aspect_Ratio", g_config.aspect_ratio); |
94 |
|
REG_SET_N("num_threads", g_config.num_threads); |
95 |
|
|
96 |
RegCloseKey(hKey); |
RegCloseKey(hKey); |
97 |
} |
} |
98 |
|
|
99 |
|
|
100 |
|
|
101 |
BOOL CALLBACK adv_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
INT_PTR CALLBACK adv_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
102 |
{ |
{ |
103 |
HWND hBrightness; |
HWND hBrightness; |
104 |
|
|
106 |
{ |
{ |
107 |
case WM_DESTROY: |
case WM_DESTROY: |
108 |
{ |
{ |
109 |
int nForceColorspace; |
LPARAM nForceColorspace; |
110 |
int aspect_ratio; |
LPARAM aspect_ratio; |
111 |
|
|
112 |
nForceColorspace = SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_GETCURSEL, 0, 0); |
nForceColorspace = SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_GETCURSEL, 0, 0); |
113 |
if ( g_config.nForceColorspace != nForceColorspace ) |
if ( g_config.nForceColorspace != nForceColorspace ) |
114 |
{ |
{ |
115 |
MessageBox(0, "You have changed the output colorspace.\r\nClose the movie and open it for the new colorspace to take effect.", "Xvid DShow", MB_TOPMOST); |
MessageBox(0, "You have changed the output colorspace.\r\nClose the movie and open it for the new colorspace to take effect.", "Xvid DShow", MB_TOPMOST); |
116 |
} |
} |
117 |
g_config.nForceColorspace = nForceColorspace; |
g_config.nForceColorspace = (int) nForceColorspace; |
118 |
|
|
119 |
aspect_ratio = SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_GETCURSEL, 0, 0); |
aspect_ratio = SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_GETCURSEL, 0, 0); |
120 |
if ( g_config.aspect_ratio != aspect_ratio ) |
if ( g_config.aspect_ratio != aspect_ratio ) |
121 |
{ |
{ |
122 |
MessageBox(0, "You have changed the default aspect ratio.\r\nClose the movie and open it for the new aspect ratio to take effect.", "Xvid DShow", MB_TOPMOST); |
MessageBox(0, "You have changed the default aspect ratio.\r\nClose the movie and open it for the new aspect ratio to take effect.", "Xvid DShow", MB_TOPMOST); |
123 |
} |
} |
124 |
g_config.aspect_ratio = aspect_ratio; |
g_config.aspect_ratio = (int) aspect_ratio; |
125 |
SaveRegistryInfo(); |
SaveRegistryInfo(); |
126 |
} |
} |
127 |
break; |
break; |
144 |
SendMessage(hBrightness, TBM_SETPOS, (WPARAM)TRUE, (LPARAM) g_config.nBrightness); |
SendMessage(hBrightness, TBM_SETPOS, (WPARAM)TRUE, (LPARAM) g_config.nBrightness); |
145 |
|
|
146 |
// Load Aspect Ratio Box |
// Load Aspect Ratio Box |
147 |
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"Auto (mpeg-4 first)"); |
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"Auto (MPEG-4 first)"); |
148 |
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"Auto (external first)"); |
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"Auto (external first)"); |
149 |
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"4:3"); |
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"4:3"); |
150 |
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"16:9"); |
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"16:9"); |
164 |
|
|
165 |
// 4CC checkbuttons |
// 4CC checkbuttons |
166 |
SendMessage(GetDlgItem(hwnd, IDC_DIVX), BM_SETCHECK, g_config.supported_4cc & SUPPORT_DIVX, 0); |
SendMessage(GetDlgItem(hwnd, IDC_DIVX), BM_SETCHECK, g_config.supported_4cc & SUPPORT_DIVX, 0); |
167 |
SendMessage(GetDlgItem(hwnd, IDC_DX50), BM_SETCHECK, g_config.supported_4cc & SUPPORT_DX50, 0); |
SendMessage(GetDlgItem(hwnd, IDC_3IVX), BM_SETCHECK, g_config.supported_4cc & SUPPORT_3IVX, 0); |
168 |
SendMessage(GetDlgItem(hwnd, IDC_MP4V), BM_SETCHECK, g_config.supported_4cc & SUPPORT_MP4V, 0); |
SendMessage(GetDlgItem(hwnd, IDC_MP4V), BM_SETCHECK, g_config.supported_4cc & SUPPORT_MP4V, 0); |
169 |
SendMessage(GetDlgItem(hwnd, IDC_COMPAT), BM_SETCHECK, g_config.videoinfo_compat, 0); |
SendMessage(GetDlgItem(hwnd, IDC_COMPAT), BM_SETCHECK, g_config.videoinfo_compat, 0); |
170 |
|
|
217 |
case IDC_DIVX: |
case IDC_DIVX: |
218 |
g_config.supported_4cc ^= SUPPORT_DIVX; |
g_config.supported_4cc ^= SUPPORT_DIVX; |
219 |
break; |
break; |
220 |
case IDC_DX50: |
case IDC_3IVX: |
221 |
g_config.supported_4cc ^= SUPPORT_DX50; |
g_config.supported_4cc ^= SUPPORT_3IVX; |
222 |
break; |
break; |
223 |
case IDC_MP4V: |
case IDC_MP4V: |
224 |
g_config.supported_4cc ^= SUPPORT_MP4V; |
g_config.supported_4cc ^= SUPPORT_MP4V; |
240 |
break; |
break; |
241 |
case WM_NOTIFY: |
case WM_NOTIFY: |
242 |
hBrightness = GetDlgItem(hwnd, IDC_BRIGHTNESS); |
hBrightness = GetDlgItem(hwnd, IDC_BRIGHTNESS); |
243 |
g_config.nBrightness = SendMessage(hBrightness, TBM_GETPOS, (WPARAM)NULL, (LPARAM)NULL); |
g_config.nBrightness = (int) SendMessage(hBrightness, TBM_GETPOS, (WPARAM)NULL, (LPARAM)NULL); |
244 |
SaveRegistryInfo(); |
SaveRegistryInfo(); |
245 |
break; |
break; |
246 |
default : |
default : |