mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-16 15:24:14 +02:00
Update to v096r01 release.
byuu says: Changelog: - restructured the project and removed a whole bunch of old/dead directives from higan/GNUmakefile - huge amounts of work on hiro/cocoa (compiles but ~70% of the functionality is commented out) - fixed a masking error in my ARM CPU disassembler [Lioncash] - SFC: decided to change board cic=(411,413) back to board region=(ntsc,pal) ... the former was too obtuse If you rename Boolean (it's a problem with an include from ruby, not from hiro) and disable all the ruby drivers, you can compile an OS X binary, but obviously it's not going to do anything. It's a boring WIP, I just wanted to push out the project structure change now at the start of this WIP cycle.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#if defined(Hiro_Viewport)
|
||||
|
||||
@implementation CocoaViewport : NSView
|
||||
|
||||
-(id) initWith:(phoenix::Viewport&)viewportReference {
|
||||
-(id) initWith:(hiro::mViewport&)viewportReference {
|
||||
if(self = [super initWithFrame:NSMakeRect(0, 0, 0, 0)]) {
|
||||
viewport = &viewportReference;
|
||||
}
|
||||
@@ -23,7 +25,7 @@
|
||||
-(BOOL) performDragOperation:(id<NSDraggingInfo>)sender {
|
||||
lstring paths = DropPaths(sender);
|
||||
if(paths.empty()) return NO;
|
||||
if(viewport->onDrop) viewport->onDrop(paths);
|
||||
viewport->doDrop(paths);
|
||||
return YES;
|
||||
}
|
||||
|
||||
@@ -35,13 +37,26 @@
|
||||
|
||||
@end
|
||||
|
||||
namespace phoenix {
|
||||
namespace hiro {
|
||||
|
||||
uintptr_t pViewport::handle() {
|
||||
return (uintptr_t)cocoaViewport;
|
||||
auto pViewport::construct() -> void {
|
||||
@autoreleasepool {
|
||||
cocoaView = cocoaViewport = [[CocoaViewport alloc] initWith:self()];
|
||||
pWidget::construct();
|
||||
}
|
||||
}
|
||||
|
||||
void pViewport::setDroppable(bool droppable) {
|
||||
auto pViewport::destruct() -> void {
|
||||
@autoreleasepool {
|
||||
[cocoaView release];
|
||||
}
|
||||
}
|
||||
|
||||
auto pViewport::handle() const -> uintptr {
|
||||
return (uintptr)cocoaViewport;
|
||||
}
|
||||
|
||||
auto pViewport::setDroppable(bool droppable) -> void {
|
||||
@autoreleasepool {
|
||||
if(droppable) {
|
||||
[cocoaViewport registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
|
||||
@@ -51,16 +66,6 @@ void pViewport::setDroppable(bool droppable) {
|
||||
}
|
||||
}
|
||||
|
||||
void pViewport::constructor() {
|
||||
@autoreleasepool {
|
||||
cocoaView = cocoaViewport = [[CocoaViewport alloc] initWith:viewport];
|
||||
}
|
||||
}
|
||||
|
||||
void pViewport::destructor() {
|
||||
@autoreleasepool {
|
||||
[cocoaView release];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user