62 |
RegCloseKey(hKey); |
RegCloseKey(hKey); |
63 |
} |
} |
64 |
|
|
65 |
void SaveRegistryInfo() |
void SaveRegistryInfo(int perfCount) |
66 |
{ |
{ |
67 |
HKEY hKey; |
HKEY hKey; |
68 |
DWORD dispo; |
DWORD dispo; |
82 |
return; |
return; |
83 |
} |
} |
84 |
|
|
85 |
|
if (perfCount > 0) { |
86 |
|
unsigned int updateCount = 0; |
87 |
|
HKEY hKey2 = hKey; |
88 |
|
DWORD size; |
89 |
|
|
90 |
|
RegOpenKeyEx(XVID_REG_KEY, XVID_REG_SUBKEY, 0, KEY_READ, &hKey); |
91 |
|
REG_GET_N("PerfCount", updateCount, 0); |
92 |
|
RegCloseKey(hKey); |
93 |
|
hKey = hKey2; |
94 |
|
updateCount += perfCount; |
95 |
|
REG_SET_N("PerfCount", updateCount); |
96 |
|
} |
97 |
|
else { |
98 |
REG_SET_N("Brightness", g_config.nBrightness); |
REG_SET_N("Brightness", g_config.nBrightness); |
99 |
REG_SET_N("Deblock_Y", g_config.nDeblock_Y); |
REG_SET_N("Deblock_Y", g_config.nDeblock_Y); |
100 |
REG_SET_N("Deblock_UV", g_config.nDeblock_UV); |
REG_SET_N("Deblock_UV", g_config.nDeblock_UV); |
108 |
REG_SET_N("Decoder_Aspect_Ratio", g_config.aspect_ratio); |
REG_SET_N("Decoder_Aspect_Ratio", g_config.aspect_ratio); |
109 |
REG_SET_N("num_threads", g_config.num_threads); |
REG_SET_N("num_threads", g_config.num_threads); |
110 |
REG_SET_N("Tray_Icon", g_config.bTrayIcon); |
REG_SET_N("Tray_Icon", g_config.bTrayIcon); |
111 |
|
} |
112 |
|
|
113 |
RegCloseKey(hKey); |
RegCloseKey(hKey); |
114 |
} |
} |
139 |
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); |
140 |
} |
} |
141 |
g_config.aspect_ratio = (int) aspect_ratio; |
g_config.aspect_ratio = (int) aspect_ratio; |
142 |
SaveRegistryInfo(); |
SaveRegistryInfo(0); |
143 |
} |
} |
144 |
break; |
break; |
145 |
|
|
288 |
|
|
289 |
EnableWindow(GetDlgItem(hwnd, IDC_USE_AR), !g_config.videoinfo_compat); |
EnableWindow(GetDlgItem(hwnd, IDC_USE_AR), !g_config.videoinfo_compat); |
290 |
|
|
291 |
SaveRegistryInfo(); |
SaveRegistryInfo(0); |
292 |
|
|
293 |
|
|
294 |
break; |
break; |
295 |
case WM_NOTIFY: |
case WM_NOTIFY: |
296 |
hBrightness = GetDlgItem(hwnd, IDC_BRIGHTNESS); |
hBrightness = GetDlgItem(hwnd, IDC_BRIGHTNESS); |
297 |
g_config.nBrightness = (int) SendMessage(hBrightness, TBM_GETPOS, (WPARAM)NULL, (LPARAM)NULL); |
g_config.nBrightness = (int) SendMessage(hBrightness, TBM_GETPOS, (WPARAM)NULL, (LPARAM)NULL); |
298 |
SaveRegistryInfo(); |
SaveRegistryInfo(0); |
299 |
break; |
break; |
300 |
default : |
default : |
301 |
return FALSE; |
return FALSE; |