[svn] / branches / dev-api-4 / xvidcore / vfw / src / config.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/vfw/src/config.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1017, Wed May 14 11:44:29 2003 UTC revision 1032, Sat May 17 13:37:49 2003 UTC
# Line 170  Line 170 
170          {"bquant_offset",                       &reg.bquant_offset,                             100},   /* 100-base float */          {"bquant_offset",                       &reg.bquant_offset,                             100},   /* 100-base float */
171          {"packed",                                      &reg.packed,                                    0},          {"packed",                                      &reg.packed,                                    0},
172          {"closed_gov",                          &reg.closed_gov,                                1},          {"closed_gov",                          &reg.closed_gov,                                1},
173          {"debug",                                       &reg.debug,                                             0},          {"vop_debug",                           &reg.vop_debug,                                 0},
174        {"debug",                                   &reg.debug,                                             0x0},
175          {"reduced_resolution",          &reg.reduced_resolution,                0},          {"reduced_resolution",          &reg.reduced_resolution,                0},
176          {"frame_drop_ratio",            &reg.frame_drop_ratio,                  0},          {"frame_drop_ratio",            &reg.frame_drop_ratio,                  0},
177    
# Line 434  Line 435 
435  }  }
436    
437    
438    #define HEX_BUF_SZ  16
439    unsigned int get_dlgitem_hex(HWND hDlg, UINT item, unsigned int def)
440    {
441            char buf[HEX_BUF_SZ];
442        unsigned int value;
443    
444        if (GetDlgItemText(hDlg, item, buf, HEX_BUF_SZ) == 0)
445            return def;
446    
447        if (sscanf(buf,"0x%x", &value)==1 || sscanf(buf,"%x", &value)==1) {
448            return value;
449        }
450    
451        return def;
452    }
453    
454    void set_dlgitem_hex(HWND hDlg, UINT item, int value)
455    {
456            char buf[HEX_BUF_SZ];
457        wsprintf(buf, "0x%x", value);
458        SetDlgItemText(hDlg, item, buf);
459    }
460    
461  /* ===================================================================================== */  /* ===================================================================================== */
462  /* QUANT MATRIX DIALOG ================================================================= */  /* QUANT MATRIX DIALOG ================================================================= */
463  /* ===================================================================================== */  /* ===================================================================================== */
# Line 858  Line 882 
882    
883                  SetDlgItemInt(hDlg, IDC_NUMTHREADS, config->num_threads, FALSE);                  SetDlgItemInt(hDlg, IDC_NUMTHREADS, config->num_threads, FALSE);
884    
885                  CheckDlg(hDlg, IDC_DEBUG, config->debug);                  CheckDlg(hDlg, IDC_VOPDEBUG, config->vop_debug);
886            set_dlgitem_hex(hDlg, IDC_DEBUG, config->debug);
887                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_SETCURSEL, config->fourcc_used, 0);                  SendDlgItemMessage(hDlg, IDC_FOURCC, CB_SETCURSEL, config->fourcc_used, 0);
888                  break;                  break;
889          }          }
# Line 1004  Line 1029 
1029                  config->num_threads = config_get_uint(hDlg, IDC_NUMTHREADS, config->num_threads);                  config->num_threads = config_get_uint(hDlg, IDC_NUMTHREADS, config->num_threads);
1030    
1031          config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0);          config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0);
1032                  config->debug = IsDlgChecked(hDlg, IDC_DEBUG);                  config->vop_debug = IsDlgChecked(hDlg, IDC_VOPDEBUG);
1033            config->debug = get_dlgitem_hex(hDlg, IDC_DEBUG, config->debug);
1034                  break;                  break;
1035          }          }
1036  }  }

Legend:
Removed from v.1017  
changed lines
  Added in v.1032

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4