Diff for /np2/macosx/sysmng.cpp between versions 1.4 and 1.10

version 1.4, 2003/10/20 10:14:27 version 1.10, 2003/12/08 00:55:33
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "np2.h"  #include        "np2.h"
 #include        "dosio.h"  #include        "dosio.h"
 #include        "i286.h"  
 #include        "sysmng.h"  #include        "sysmng.h"
   #include        "cpucore.h"
 #include        "pccore.h"  #include        "pccore.h"
 #include        "fddfile.h"  #include        "fddfile.h"
   #include        "diskdrv.h"
   
         UINT    sys_updates;          UINT    sys_updates;
   
Line 24  static struct { Line 24  static struct {
 void sysmng_workclockreset(void) {  void sysmng_workclockreset(void) {
   
         workclock.tick = GETTICK();          workclock.tick = GETTICK();
         workclock.clock = I286_CLOCK;          workclock.clock = CPU_CLOCK;
         workclock.draws = drawcount;          workclock.draws = drawcount;
 }  }
   
Line 39  BOOL sysmng_workclockrenewal(void) { Line 39  BOOL sysmng_workclockrenewal(void) {
         workclock.tick += tick;          workclock.tick += tick;
         workclock.fps = ((drawcount - workclock.draws) * 10000) / tick;          workclock.fps = ((drawcount - workclock.draws) * 10000) / tick;
         workclock.draws = drawcount;          workclock.draws = drawcount;
         workclock.khz = (I286_CLOCK - workclock.clock) / tick;          workclock.khz = (CPU_CLOCK - workclock.clock) / tick;
         workclock.clock = I286_CLOCK;          workclock.clock = CPU_CLOCK;
         return(TRUE);          return(TRUE);
 }  }
   
 void sysmng_updatecaption(BYTE flag) {  void sysmng_updatecaption(BYTE flag) {
   
       char        name1[255], name2[255];
         char    work[256];          char    work[256];
   #ifndef NP2GCC
         Str255  str;          Str255  str;
   #endif
   
         if (flag & 1) {          if (flag & 1) {
                 strtitle[0] = '\0';                  strtitle[0] = '\0';
                 if (fdd_diskready(0)) {                  if (fdd_diskready(0)) {
                         milstr_ncat(strtitle, "  FDD1:", sizeof(strtitle));                          milstr_ncat(strtitle, "  FDD1:", sizeof(strtitle));
                         milstr_ncat(strtitle, file_getname((char *)fdd_diskname(0)),              if (getLongFileName(name1, fdd_diskname(0))) {
                   milstr_ncat(strtitle, name1, sizeof(strtitle));
               }
               else {
                   milstr_ncat(strtitle, file_getname((char *)fdd_diskname(0)),
                                                                                                                         sizeof(strtitle));                                                                                                                          sizeof(strtitle));
               }
                 }                  }
                 if (fdd_diskready(1)) {                  if (fdd_diskready(1)) {
                         milstr_ncat(strtitle, "  FDD2:", sizeof(strtitle));                          milstr_ncat(strtitle, "  FDD2:", sizeof(strtitle));
                         milstr_ncat(strtitle, file_getname((char *)fdd_diskname(1)),              if (getLongFileName(name2, fdd_diskname(1))) {
                   milstr_ncat(strtitle, name2, sizeof(strtitle));
               }
               else {
                   milstr_ncat(strtitle, file_getname((char *)fdd_diskname(1)),
                                                                                                                         sizeof(strtitle));                                                                                                                          sizeof(strtitle));
               }
                 }                  }
         }          }
         if (flag & 2) {          if (flag & 2) {
Line 82  void sysmng_updatecaption(BYTE flag) { Line 95  void sysmng_updatecaption(BYTE flag) {
                         milstr_ncat(strclock, work, sizeof(strclock));                          milstr_ncat(strclock, work, sizeof(strclock));
                 }                  }
         }          }
   #if defined(NP2GCC)
           milstr_ncpy(work, np2oscfg.titles, sizeof(work));
   #else
         milstr_ncpy(work, "Neko Project II", sizeof(work));          milstr_ncpy(work, "Neko Project II", sizeof(work));
   #endif
         milstr_ncat(work, strtitle, sizeof(work));          milstr_ncat(work, strtitle, sizeof(work));
         milstr_ncat(work, strclock, sizeof(work));          milstr_ncat(work, strclock, sizeof(work));
   
         mkstr255(str, work);  
 #if defined(NP2GCC)  #if defined(NP2GCC)
     SetWindowTitleWithCFString(hWndMain, CFStringCreateWithPascalString(NULL, str, CFStringGetSystemEncoding()));      SetWindowTitleWithCFString(hWndMain, CFStringCreateWithCString(NULL, work, CFStringGetSystemEncoding()));
 #else  #else
           mkstr255(str, work);
         SetWTitle(hWndMain, str);          SetWTitle(hWndMain, str);
 #endif  #endif
 }  }
   

Removed from v.1.4  
changed lines
  Added in v.1.10


RetroPC.NET-CVS <cvs@retropc.net>