1.1 --- a/src/cocoaui/cocoa_win.c Tue Jul 29 08:51:10 2008 +0000
1.2 +++ b/src/cocoaui/cocoa_win.c Thu Aug 28 01:39:51 2008 +0000
1.4 #include "cocoaui/cocoaui.h"
1.6 #include "dreamcast.h"
1.7 +#include "gdrom/gdrom.h"
1.8 #include <ApplicationServices/ApplicationServices.h>
1.10 @interface NSWindow (OSX10_5_and_later)
1.12 [self setDelegate: [NSApp delegate]];
1.13 [self setContentMinSize: contentRect.size];
1.14 [self setAcceptsMouseMovedEvents: YES];
1.16 - NSString *title = [[NSString alloc] initWithCString: lxdream_package_name encoding: NSASCIIStringEncoding];
1.17 - [self setTitle: title];
1.18 + [self updateTitle];
1.20 NSToolbar *toolbar = [[NSToolbar alloc] initWithIdentifier: @"LxdreamToolbar"];
1.21 [toolbar setDelegate: [[LxdreamToolbarDelegate alloc] init]];
1.22 @@ -169,6 +168,18 @@
1.26 +- (void)updateTitle
1.29 + const char *disc_title = gdrom_get_current_disc_title();
1.30 + if( disc_title == NULL ) {
1.31 + title = [NSString stringWithCString: lxdream_package_name];
1.33 + title = [NSString stringWithFormat: @"%s - %s", lxdream_package_name, disc_title];
1.35 + [self setTitle: title];
1.38 - (void)setStatusText: (const gchar *)text