mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-30 16:39:46 +02:00
Update to v103r23 release.
byuu says: Changelog: - gb: added accelerometer X-axis, Y-Axis inputs¹ - gb: added rumble input¹ - gb/mbc5: added rumble support² - gb/mbc6: added skeleton driver, but it doesn't boot Net de Get - gb/mbc7: added mostly complete driver (only missing EEPROM), but it doesn't boot Kirby Tilt 'n' Tumble - gb/tama: added leap year assignment - tomoko: fixed macOS compilation [MerryMage] - hiro/cocoa: fix table cell redrawing on updates and automatic column resizing [ncbncb] - hiro/cocoa: fix some weird issue with clicking table view checkboxes on Retina displays [ncbncb] - icarus: enhance Game Boy heuristics³ - nall: fix three missing return statements [Jonas Quinn] - ruby: hopefully fixed all compilation errors reported by Screwtape et al⁴ ¹: because there's no concept of a controller for cartridge inputs, I'm attaching to the base platform for now. An idea I had was to make separate ports for each cartridge type ... but this would duplicate the rumble input between MBC5 and MBC7. And would also be less discoverable. But it would be more clean in that users wouldn't think the Game Boy hardware had this functionality. I'll think about it. ²: it probably won't work yet. Rumble isn't documented anywhere, but I dug through an emulator named GEST and discovered that it seems to use bit 3 of the RAM bank select to be rumble. I don't know if it sets the bit for rumbling, then clears when finished, or if it sets it and then after a few milliseconds it stops rumbling. I couldn't test on my FreeBSD box because SDL 1.2 doesn't support rumble, udev doesn't exist on FreeBSD, and nobody has ever posted any working code for how to use evdev (or whatever it's called) on FreeBSD. ³: I'm still thinking about specifying the MBC7 RAM as EEPROM, since it's not really static RAM. ⁴: if possible, please test all drivers if you can. I want to ensure they're all working. Especially let me know if the following work: macOS: input.carbon Linux: audio.pulseaudiosimple, audio.ao (libao) If I can confirm these are working, I'm going to then remove them from being included with stock higan builds. I'm also considering dropping SDL video on Linux/BSD. XShm is much faster and supports blurring. I may also drop SDL input on Linux, since udev works better. That will free a dependency on SDL 1.2 for building higan. FreeBSD is still going to need it for joypad support, however.
This commit is contained in:
@@ -9,29 +9,31 @@ auto pTableViewCell::destruct() -> void {
|
||||
}
|
||||
|
||||
auto pTableViewCell::setAlignment(Alignment alignment) -> void {
|
||||
_redraw();
|
||||
}
|
||||
|
||||
auto pTableViewCell::setBackgroundColor(Color color) -> void {
|
||||
_redraw();
|
||||
}
|
||||
|
||||
auto pTableViewCell::setCheckable(bool checkable) -> void {
|
||||
_redraw();
|
||||
}
|
||||
|
||||
auto pTableViewCell::setChecked(bool checked) -> void {
|
||||
_redraw();
|
||||
}
|
||||
|
||||
auto pTableViewCell::setForegroundColor(Color color) -> void {
|
||||
_redraw();
|
||||
}
|
||||
|
||||
auto pTableViewCell::setIcon(const image& icon) -> void {
|
||||
_redraw();
|
||||
}
|
||||
|
||||
auto pTableViewCell::setText(const string& text) -> void {
|
||||
@autoreleasepool {
|
||||
if(auto pTableView = _grandparent()) {
|
||||
[[pTableView->cocoaView content] reloadData];
|
||||
}
|
||||
}
|
||||
_redraw();
|
||||
}
|
||||
|
||||
auto pTableViewCell::_grandparent() -> maybe<pTableView&> {
|
||||
@@ -45,6 +47,19 @@ auto pTableViewCell::_parent() -> maybe<pTableViewItem&> {
|
||||
return nothing;
|
||||
}
|
||||
|
||||
auto pTableViewCell::_redraw() -> void {
|
||||
@autoreleasepool {
|
||||
if(auto pTableViewItem = _parent()) {
|
||||
if(auto pTableView = _grandparent()) {
|
||||
auto column = self().offset();
|
||||
auto row = pTableViewItem->self().offset();
|
||||
NSRect rect = [[pTableView->cocoaTableView content] frameOfCellAtColumn:column row:row];
|
||||
[[pTableView->cocoaTableView content] setNeedsDisplayInRect:rect];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -15,6 +15,7 @@ struct pTableViewCell : pObject {
|
||||
|
||||
auto _grandparent() -> maybe<pTableView&>;
|
||||
auto _parent() -> maybe<pTableViewItem&>;
|
||||
auto _redraw() -> void;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -52,6 +52,7 @@
|
||||
[content setFont:font];
|
||||
[content setRowHeight:fontHeight];
|
||||
[self reloadColumns];
|
||||
tableView->resizeColumns();
|
||||
}
|
||||
|
||||
-(void) reloadColumns {
|
||||
@@ -214,7 +215,7 @@
|
||||
//needed to trigger trackMouse events
|
||||
-(NSUInteger) hitTestForEvent:(NSEvent*)event inRect:(NSRect)frame ofView:(NSView*)view {
|
||||
NSUInteger hitTest = [super hitTestForEvent:event inRect:frame ofView:view];
|
||||
NSPoint point = [view convertPointFromBase:[event locationInWindow]];
|
||||
NSPoint point = [view convertPoint:[event locationInWindow] fromView:nil];
|
||||
NSRect rect = NSMakeRect(frame.origin.x, frame.origin.y, frame.size.height, frame.size.height);
|
||||
if(NSMouseInRect(point, rect, [view isFlipped])) {
|
||||
hitTest |= NSCellHitTrackableArea;
|
||||
@@ -230,7 +231,7 @@
|
||||
NSEvent* nextEvent;
|
||||
while((nextEvent = [window nextEventMatchingMask:(NSLeftMouseDragged | NSLeftMouseUp)])) {
|
||||
if([nextEvent type] == NSLeftMouseUp) {
|
||||
NSPoint point = [view convertPointFromBase:[nextEvent locationInWindow]];
|
||||
NSPoint point = [view convertPoint:[nextEvent locationInWindow] fromView:nil];
|
||||
NSRect rect = NSMakeRect(frame.origin.x, frame.origin.y, frame.size.height, frame.size.height);
|
||||
if(NSMouseInRect(point, rect, [view isFlipped])) {
|
||||
if(auto tableViewItem = tableView->item([view rowAtPoint:point])) {
|
||||
@@ -279,6 +280,7 @@ auto pTableView::destruct() -> void {
|
||||
auto pTableView::append(sTableViewHeader header) -> void {
|
||||
@autoreleasepool {
|
||||
[cocoaView reloadColumns];
|
||||
resizeColumns();
|
||||
|
||||
header->setVisible(header->visible());
|
||||
}
|
||||
@@ -293,6 +295,7 @@ auto pTableView::append(sTableViewItem item) -> void {
|
||||
auto pTableView::remove(sTableViewHeader header) -> void {
|
||||
@autoreleasepool {
|
||||
[cocoaView reloadColumns];
|
||||
resizeColumns();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user