mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-31 22:42:30 +02:00
Update to v106r56 release.
byuu says: I fixed all outstanding bugs that I'm aware of, including all of the errata I listed yesterday. And now it's time for lots of regression testing. After that, I need to add Talarubi's XAudio2 DRC code, and then get a new public bsnes WIP out for final testing. New errata: when setting an icon (nall::image) larger than a Canvas on Windows, it's not centering the image, so you end up seeing the overscan area in the state manager previews, and the bottom of the image gets cut off. I also need to forcefully disable the Xlib screensaver disable support. I think I'll remove the GUI option to bypass it as well, and just force screensaver disable always on with Windows. I'll improve it in the future to toggle the effect between emulator pauses.
This commit is contained in:
@@ -205,20 +205,6 @@ static auto CALLBACK Shared_windowProc(WindowProc windowProc, HWND hwnd, UINT ms
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_DRAWITEM: {
|
||||
auto drawItem = (LPDRAWITEMSTRUCT)lparam;
|
||||
auto object = (mObject*)GetWindowLongPtr((HWND)drawItem->hwndItem, GWLP_USERDATA);
|
||||
if(!object) break;
|
||||
|
||||
#if defined(Hiro_TabFrame)
|
||||
if(auto tabFrame = dynamic_cast<mTabFrame*>(object)) {
|
||||
return tabFrame->self()->onDrawItem(lparam), true;
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_GETMINMAXINFO: {
|
||||
auto info = (LPMINMAXINFO)lparam;
|
||||
auto frameMargin = pWindow->frameMargin();
|
||||
|
@@ -105,45 +105,28 @@ auto pTabFrame::_buildImageList() -> void {
|
||||
}
|
||||
}
|
||||
|
||||
//hide all TabFrameItems, and then display the selected TabFrameItem
|
||||
auto pTabFrame::_synchronizeSizable() -> void {
|
||||
for(auto& item : state().items) {
|
||||
if(auto& sizable = item->state.sizable) {
|
||||
sizable->setVisible(item->selected());
|
||||
}
|
||||
if(auto& sizable = item->state.sizable) sizable->setVisible(false);
|
||||
}
|
||||
//without this call, widgets from the previous tab will remain visible
|
||||
//alongside widgets from the newly selected tab for about one frame ...
|
||||
Application::processEvents();
|
||||
uint selected = TabCtrl_GetCurSel(hwnd);
|
||||
if(auto item = self().item(selected)) {
|
||||
if(auto& sizable = item->state.sizable) sizable->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
auto pTabFrame::onChange() -> void {
|
||||
unsigned selected = TabCtrl_GetCurSel(hwnd);
|
||||
uint selected = TabCtrl_GetCurSel(hwnd);
|
||||
for(auto& item : state().items) item->state.selected = false;
|
||||
if(auto item = self().item(selected)) item->state.selected = true;
|
||||
_synchronizeSizable();
|
||||
self().doChange();
|
||||
}
|
||||
|
||||
//called only if TCS_OWNERDRAWFIXED style is used
|
||||
//this style disables XP/Vista theming of the TabFrame
|
||||
auto pTabFrame::onDrawItem(LPARAM lparam) -> void {
|
||||
/*
|
||||
auto item = (LPDRAWITEMSTRUCT)lparam;
|
||||
FillRect(item->hDC, &item->rcItem, GetSysColorBrush(COLOR_3DFACE));
|
||||
SetBkMode(item->hDC, TRANSPARENT);
|
||||
SetTextColor(item->hDC, GetSysColor(COLOR_BTNTEXT));
|
||||
|
||||
unsigned selection = item->itemID;
|
||||
if(selection < tabFrame.state.text.size()) {
|
||||
string text = tabFrame.state.text[selection];
|
||||
Size size = pFont::size(hfont, text);
|
||||
unsigned width = item->rcItem.right - item->rcItem.left + 1;
|
||||
if(tabFrame.state.image[selection]) {
|
||||
width += size.height + 2;
|
||||
ImageList_Draw(imageList, selection, item->hDC, item->rcItem.left + (width - size.width) / 2 - (size.height + 3), item->rcItem.top + 2, ILD_NORMAL);
|
||||
}
|
||||
TextOut(item->hDC, item->rcItem.left + (width - size.width) / 2, item->rcItem.top + 2, utf16_t(text), text.size());
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -13,7 +13,6 @@ struct pTabFrame : pWidget {
|
||||
auto setVisible(bool visible) -> void override;
|
||||
|
||||
auto onChange() -> void;
|
||||
auto onDrawItem(LPARAM lparam) -> void;
|
||||
|
||||
auto _buildImageList() -> void;
|
||||
auto _synchronizeSizable() -> void;
|
||||
|
Reference in New Issue
Block a user