500 |
return (success) ? tmp : config; |
return (success) ? tmp : config; |
501 |
} |
} |
502 |
|
|
503 |
|
/* get uint from combobox |
504 |
|
GetDlgItemInt doesnt work properly for cb list items */ |
505 |
|
#define UINT_BUF_SZ 20 |
506 |
|
static int config_get_cbuint(HWND hDlg, UINT item, int def) |
507 |
|
{ |
508 |
|
int sel = SendMessage(GetDlgItem(hDlg, item), CB_GETCURSEL, 0, 0); |
509 |
|
char buf[UINT_BUF_SZ]; |
510 |
|
|
511 |
|
if (sel<0) { |
512 |
|
return config_get_uint(hDlg, item, def); |
513 |
|
} |
514 |
|
|
515 |
|
if (SendMessage(GetDlgItem(hDlg, item), CB_GETLBTEXT, sel, (LPARAM)buf) == CB_ERR) { |
516 |
|
return def; |
517 |
|
} |
518 |
|
|
519 |
|
return atoi(buf); |
520 |
|
} |
521 |
|
|
522 |
|
|
523 |
/* we use "100 base" floats */ |
/* we use "100 base" floats */ |
524 |
|
|
750 |
|
|
751 |
SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"665600"); |
SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"665600"); |
752 |
SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"716800"); |
SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"716800"); |
753 |
|
SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"1331200"); |
754 |
|
SendDlgItemMessage(hDlg, IDC_BITRATE_TSIZE, CB_ADDSTRING, 0, (LPARAM)"1433600"); |
755 |
|
|
756 |
for (i=0; i<sizeof(video_fps_list)/sizeof(named_float_t); i++) |
for (i=0; i<sizeof(video_fps_list)/sizeof(named_float_t); i++) |
757 |
SendDlgItemMessage(hDlg, IDC_BITRATE_FPS, CB_ADDSTRING, 0, (LPARAM)video_fps_list[i].name); |
SendDlgItemMessage(hDlg, IDC_BITRATE_FPS, CB_ADDSTRING, 0, (LPARAM)video_fps_list[i].name); |
884 |
case IDD_BITRATE : |
case IDD_BITRATE : |
885 |
{ |
{ |
886 |
int ctype = SendDlgItemMessage(hDlg, IDC_BITRATE_CFORMAT, CB_GETCURSEL, 0, 0); |
int ctype = SendDlgItemMessage(hDlg, IDC_BITRATE_CFORMAT, CB_GETCURSEL, 0, 0); |
887 |
int target_size = config_get_uint(hDlg, IDC_BITRATE_TSIZE, 0); |
int target_size = config_get_cbuint(hDlg, IDC_BITRATE_TSIZE, 0); |
888 |
int subtitle_size = config_get_uint(hDlg, IDC_BITRATE_SSIZE, 0); |
int subtitle_size = config_get_uint(hDlg, IDC_BITRATE_SSIZE, 0); |
889 |
int fps = SendDlgItemMessage(hDlg, IDC_BITRATE_FPS, CB_GETCURSEL, 0, 0); |
int fps = SendDlgItemMessage(hDlg, IDC_BITRATE_FPS, CB_GETCURSEL, 0, 0); |
890 |
|
|
895 |
|
|
896 |
int audio_type = SendDlgItemMessage(hDlg, IDC_BITRATE_AFORMAT, CB_GETCURSEL, 0, 0); |
int audio_type = SendDlgItemMessage(hDlg, IDC_BITRATE_AFORMAT, CB_GETCURSEL, 0, 0); |
897 |
int audio_mode = IsDlgChecked(hDlg, IDC_BITRATE_AMODE_SIZE); |
int audio_mode = IsDlgChecked(hDlg, IDC_BITRATE_AMODE_SIZE); |
898 |
int audio_rate = config_get_uint(hDlg, IDC_BITRATE_ARATE, 0); |
int audio_rate = config_get_cbuint(hDlg, IDC_BITRATE_ARATE, 0); |
899 |
int audio_size = config_get_uint(hDlg, IDC_BITRATE_ASIZE, 0); |
int audio_size = config_get_uint(hDlg, IDC_BITRATE_ASIZE, 0); |
900 |
|
|
901 |
int frames; |
int frames; |
1496 |
}else if ((HIWORD(wParam) == CBN_EDITCHANGE || HIWORD(wParam)==CBN_SELCHANGE) && |
}else if ((HIWORD(wParam) == CBN_EDITCHANGE || HIWORD(wParam)==CBN_SELCHANGE) && |
1497 |
(LOWORD(wParam)==IDC_BITRATE_TSIZE || |
(LOWORD(wParam)==IDC_BITRATE_TSIZE || |
1498 |
LOWORD(wParam)==IDC_BITRATE_ARATE )) { |
LOWORD(wParam)==IDC_BITRATE_ARATE )) { |
1499 |
|
|
1500 |
adv_mode(hDlg, psi->idd, psi->config); |
adv_mode(hDlg, psi->idd, psi->config); |
1501 |
|
|
1502 |
}else if (HIWORD(wParam) == LBN_SELCHANGE && |
}else if (HIWORD(wParam) == LBN_SELCHANGE && |
1503 |
(LOWORD(wParam) == IDC_PROFILE_PROFILE || |
(LOWORD(wParam) == IDC_PROFILE_PROFILE || |
1504 |
LOWORD(wParam) == IDC_LEVEL_PROFILE || |
LOWORD(wParam) == IDC_LEVEL_PROFILE || |
1545 |
switch (((NMHDR *)lParam)->code) |
switch (((NMHDR *)lParam)->code) |
1546 |
{ |
{ |
1547 |
case PSN_SETACTIVE : |
case PSN_SETACTIVE : |
1548 |
OutputDebugString("PSN_SET"); |
DPRINTF("PSN_SET"); |
1549 |
adv_upload(hDlg, psi->idd, psi->config); |
adv_upload(hDlg, psi->idd, psi->config); |
1550 |
adv_mode(hDlg, psi->idd, psi->config); |
adv_mode(hDlg, psi->idd, psi->config); |
1551 |
SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); |
SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); |
1552 |
break; |
break; |
1553 |
|
|
1554 |
case PSN_KILLACTIVE : |
case PSN_KILLACTIVE : |
1555 |
OutputDebugString("PSN_KILL"); |
DPRINTF("PSN_KILL"); |
1556 |
adv_download(hDlg, psi->idd, psi->config); |
adv_download(hDlg, psi->idd, psi->config); |
1557 |
SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); |
SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); |
1558 |
break; |
break; |
1559 |
|
|
1560 |
case PSN_APPLY : |
case PSN_APPLY : |
1561 |
OutputDebugString("PSN_APPLY"); |
DPRINTF("PSN_APPLY"); |
1562 |
psi->config->save = TRUE; |
psi->config->save = TRUE; |
1563 |
SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); |
SetWindowLong(hDlg, DWL_MSGRESULT, FALSE); |
1564 |
break; |
break; |
1867 |
break; |
break; |
1868 |
} |
} |
1869 |
|
|
|
if (n->code == NM_RCLICK) { |
|
|
OutputDebugString("Right click"); |
|
|
} |
|
1870 |
break; |
break; |
1871 |
} |
} |
1872 |
|
|