Ticket #36070: 3776.diff

File 3776.diff, 627 bytes (added by domiman@…, 12 years ago)
  • src/dos/dos_execute.cpp

     
    9393        DOS_MCB mcb(dos.psp()-1);
    9494        static char name[9];
    9595        mcb.GetFileName(name);
     96        name[8] = 0;
    9697        if (!strlen(name)) strcpy(name,"DOSBOX");
    97         RunningProgram=name;
     98        for(Bitu i = 0;i < 8;i++) { //Don't put garbage in the title bar. Mac OS X doesn't like it
     99                if (name[i] == 0) break;
     100                if ( !isprint(*reinterpret_cast<unsigned char*>(&name[i])) ) name[i] = '?';
     101        }
     102        RunningProgram = name;
    98103        GFX_SetTitle(-1,-1,false);
    99104}
    100105