[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 1294, Sun Dec 21 16:19:41 2003 UTC revision 1301, Fri Jan 2 13:18:28 2004 UTC
# Line 266  Line 266 
266    
267  #define REG_GET_B(X, Y, Z) size=sizeof((Z));if(RegQueryValueEx(hKey, X, 0, 0, Y, &size) != ERROR_SUCCESS) {memcpy(Y, Z, sizeof((Z)));}  #define REG_GET_B(X, Y, Z) size=sizeof((Z));if(RegQueryValueEx(hKey, X, 0, 0, Y, &size) != ERROR_SUCCESS) {memcpy(Y, Z, sizeof((Z)));}
268    
269    #define XVID_DLL_NAME "xvidcore.dll"
270    
271  void config_reg_get(CONFIG * config)  void config_reg_get(CONFIG * config)
272  {  {
273      char tmp[32];      char tmp[32];
# Line 273  Line 275 
275          DWORD size;          DWORD size;
276      int i,j;      int i,j;
277          xvid_gbl_info_t info;          xvid_gbl_info_t info;
278            HINSTANCE m_hdll;
279    
280          memset(&info, 0, sizeof(info));          memset(&info, 0, sizeof(info));
281          info.version = XVID_VERSION;          info.version = XVID_VERSION;
282          xvid_global(0, XVID_GBL_INFO, &info, NULL);  
283            m_hdll = LoadLibrary(XVID_DLL_NAME);
284            if (m_hdll != NULL) {
285    
286                    ((int (__cdecl *)(void *, int, void *, void *))GetProcAddress(m_hdll, "xvid_global"))
287                            (0, XVID_GBL_INFO, &info, NULL);
288    
289                    FreeLibrary(m_hdll);
290            }
291    
292          reg.cpu = info.cpu_flags;          reg.cpu = info.cpu_flags;
293          reg.num_threads = info.num_threads;          reg.num_threads = info.num_threads;
294    
# Line 1689  Line 1701 
1701                          char core[100];                          char core[100];
1702                          HFONT hFont;                          HFONT hFont;
1703                          LOGFONT lfData;                          LOGFONT lfData;
1704                            HINSTANCE m_hdll;
1705    
1706                          SetDlgItemText(hDlg, IDC_BUILD, XVID_BUILD);                          SetDlgItemText(hDlg, IDC_BUILD, XVID_BUILD);
1707                          SetDlgItemText(hDlg, IDC_SPECIAL_BUILD, XVID_SPECIAL_BUILD);                          SetDlgItemText(hDlg, IDC_SPECIAL_BUILD, XVID_SPECIAL_BUILD);
1708    
1709                          memset(&info, 0, sizeof(info));                          memset(&info, 0, sizeof(info));
1710                          info.version = XVID_VERSION;                          info.version = XVID_VERSION;
1711                          xvid_global(0, XVID_GBL_INFO, &info, NULL);  
1712                          wsprintf(core, "libxvidcore version %d.%d.%d (\"%s\")",                          m_hdll = LoadLibrary(XVID_DLL_NAME);
1713                            if (m_hdll != NULL) {
1714    
1715                                    ((int (__cdecl *)(void *, int, void *, void *))GetProcAddress(m_hdll, "xvid_global"))
1716                                            (0, XVID_GBL_INFO, &info, NULL);
1717    
1718                                    wsprintf(core, "xvidcore.dll version %d.%d.%d (\"%s\")",
1719                                  XVID_VERSION_MAJOR(info.actual_version),                                  XVID_VERSION_MAJOR(info.actual_version),
1720                                  XVID_VERSION_MINOR(info.actual_version),                                  XVID_VERSION_MINOR(info.actual_version),
1721                                  XVID_VERSION_PATCH(info.actual_version),                                  XVID_VERSION_PATCH(info.actual_version),
1722                                  info.build);                                  info.build);
1723    
1724                                    FreeLibrary(m_hdll);
1725                            } else {
1726                                    wsprintf(core, "xvidcore.dll not found!");
1727                            }
1728    
1729                          SetDlgItemText(hDlg, IDC_CORE, core);                          SetDlgItemText(hDlg, IDC_CORE, core);
1730    
1731                          hFont = (HFONT)SendDlgItemMessage(hDlg, IDC_WEBSITE, WM_GETFONT, 0, 0L);                          hFont = (HFONT)SendDlgItemMessage(hDlg, IDC_WEBSITE, WM_GETFONT, 0, 0L);
# Line 1719  Line 1743 
1743                          SetDlgItemText(hDlg, IDC_WEBSITE, XVID_WEBSITE);                          SetDlgItemText(hDlg, IDC_WEBSITE, XVID_WEBSITE);
1744                  }                  }
1745                  break;                  break;
   
1746          case WM_CTLCOLORSTATIC :          case WM_CTLCOLORSTATIC :
1747                  if ((HWND)lParam == GetDlgItem(hDlg, IDC_WEBSITE))                  if ((HWND)lParam == GetDlgItem(hDlg, IDC_WEBSITE))
1748                  {                  {

Legend:
Removed from v.1294  
changed lines
  Added in v.1301

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