bsnes/hiro/windows/widget/list-view.cpp

289 lines
8.8 KiB
C++
Raw Normal View History

namespace phoenix {
unsigned ListView_GetColumnCount(HWND hwnd) {
unsigned count = 0;
LVCOLUMN column;
column.mask = LVCF_WIDTH;
while(ListView_GetColumn(hwnd, count++, &column));
return --count;
}
void ListView_SetImage(HWND hwnd, HIMAGELIST imageList, unsigned row, unsigned column, unsigned imageID) {
//if this is the first image assigned, set image list now
//do not set sooner, or image blocks will appear in a list with no images
if(ListView_GetImageList(hwnd, LVSIL_SMALL) != imageList) {
ListView_SetImageList(hwnd, imageList, LVSIL_SMALL);
}
LVITEM item;
item.mask = LVIF_IMAGE;
item.iItem = row;
item.iSubItem = column;
item.iImage = imageID;
ListView_SetItem(hwnd, &item);
}
void pListView::append(const lstring& list) {
wchar_t empty[] = L"";
unsigned row = ListView_GetItemCount(hwnd);
LVITEM item;
item.mask = LVIF_TEXT;
item.iItem = row;
item.iSubItem = 0;
item.pszText = empty;
locked = true;
ListView_InsertItem(hwnd, &item);
locked = false;
for(unsigned column = 0; column < list.size(); column++) {
utf16_t wtext(list(column, ""));
ListView_SetItemText(hwnd, row, column, wtext);
}
}
void pListView::autoSizeColumns() {
unsigned columns = ListView_GetColumnCount(hwnd);
for(unsigned n = 0; n < columns; n++) {
ListView_SetColumnWidth(hwnd, n, LVSCW_AUTOSIZE_USEHEADER);
}
}
void pListView::remove(unsigned selection) {
ListView_DeleteItem(hwnd, selection);
}
void pListView::reset() {
ListView_DeleteAllItems(hwnd);
buildImageList(); //free previously allocated images
}
Update to v094r08 release. byuu says: Lots of changes this time around. FreeBSD stability and compilation is still a work in progress. FreeBSD 10 + Clang 3.3 = 108fps FreeBSD 10 + GCC 4.7 = 130fps Errata 1: I've been fighting that god-damned endian.h header for the past nine WIPs now. The above WIP isn't building now because FreeBSD isn't including headers before using certain types, and you end up with a trillion error messages. So just delete all the endian.h includes from nall/intrinsics.hpp to build. Errata 2: I was trying to match g++ and g++47, so I used $(findstring g++,$(compiler)), which ends up also matching clang++. Oops. Easy fix, put Clang first and then else if g++ next. Not ideal, but oh well. All it's doing for now is declaring -fwrapv twice, so you don't have to fix it just yet. Probably just going to alias g++="g++47" and do exact matching instead. Errata 3: both OpenGL::term and VideoGLX::term are causing a core dump on BSD. No idea why. The resources are initialized and valid, but releasing them crashes the application. Changelog: - nall/Makefile is more flexible with overriding $(compiler), so you can build with GCC or Clang on BSD (defaults to GCC now) - PLATFORM_X was renamed to PLATFORM_XORG, and it's also declared with PLATFORM_LINUX or PLATFORM_BSD - PLATFORM_XORG probably isn't the best name ... still thinking about what best to call LINUX|BSD|SOLARIS or ^(WINDOWS|MACOSX) - fixed a few legitimate Clang warning messages in nall - Compiler::VisualCPP is ugly as hell, renamed to Compiler::CL - nall/platform includes nall/intrinsics first. Trying to move away from testing for _WIN32, etc directly in all files. Work in progress. - nall turns off Clang warnings that I won't "fix", because they aren't broken. It's much less noisy to compile with warnings on now. - phoenix gains the ability to set background and foreground colors on various text container widgets (GTK only for now.) - rewrote a lot of the MSU1 code to try and simplify it. Really hope I didn't break anything ... I don't have any MSU1 test ROMs handy - SNES coprocessor audio is now mixed as sclamp<16>(system_sample + coprocessor_sample) instead of sclamp<16>((sys + cop) / 2) - allows for greater chance of aliasing (still low, SNES audio is quiet), but doesn't cut base system volume in half anymore - fixed Super Scope and Justifier cursor colors - use input.xlib instead of input.x ... allows Xlib input driver to be visible on Linux and BSD once again - make install and make uninstall must be run as root again; no longer using install but cp instead for BSD compatibility - killed $(DESTDIR) ... use make prefix=$DESTDIR$prefix instead - you can now set text/background colors for the loki console via (eg): - settings.terminal.background-color 0x000000 - settings.terminal.foreground-color 0xffffff
2014-02-24 09:39:09 +00:00
void pListView::setBackgroundColor(Color color) {
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
ListView_SetBkColor(hwnd, RGB(color.red, color.green, color.blue));
Update to v094r08 release. byuu says: Lots of changes this time around. FreeBSD stability and compilation is still a work in progress. FreeBSD 10 + Clang 3.3 = 108fps FreeBSD 10 + GCC 4.7 = 130fps Errata 1: I've been fighting that god-damned endian.h header for the past nine WIPs now. The above WIP isn't building now because FreeBSD isn't including headers before using certain types, and you end up with a trillion error messages. So just delete all the endian.h includes from nall/intrinsics.hpp to build. Errata 2: I was trying to match g++ and g++47, so I used $(findstring g++,$(compiler)), which ends up also matching clang++. Oops. Easy fix, put Clang first and then else if g++ next. Not ideal, but oh well. All it's doing for now is declaring -fwrapv twice, so you don't have to fix it just yet. Probably just going to alias g++="g++47" and do exact matching instead. Errata 3: both OpenGL::term and VideoGLX::term are causing a core dump on BSD. No idea why. The resources are initialized and valid, but releasing them crashes the application. Changelog: - nall/Makefile is more flexible with overriding $(compiler), so you can build with GCC or Clang on BSD (defaults to GCC now) - PLATFORM_X was renamed to PLATFORM_XORG, and it's also declared with PLATFORM_LINUX or PLATFORM_BSD - PLATFORM_XORG probably isn't the best name ... still thinking about what best to call LINUX|BSD|SOLARIS or ^(WINDOWS|MACOSX) - fixed a few legitimate Clang warning messages in nall - Compiler::VisualCPP is ugly as hell, renamed to Compiler::CL - nall/platform includes nall/intrinsics first. Trying to move away from testing for _WIN32, etc directly in all files. Work in progress. - nall turns off Clang warnings that I won't "fix", because they aren't broken. It's much less noisy to compile with warnings on now. - phoenix gains the ability to set background and foreground colors on various text container widgets (GTK only for now.) - rewrote a lot of the MSU1 code to try and simplify it. Really hope I didn't break anything ... I don't have any MSU1 test ROMs handy - SNES coprocessor audio is now mixed as sclamp<16>(system_sample + coprocessor_sample) instead of sclamp<16>((sys + cop) / 2) - allows for greater chance of aliasing (still low, SNES audio is quiet), but doesn't cut base system volume in half anymore - fixed Super Scope and Justifier cursor colors - use input.xlib instead of input.x ... allows Xlib input driver to be visible on Linux and BSD once again - make install and make uninstall must be run as root again; no longer using install but cp instead for BSD compatibility - killed $(DESTDIR) ... use make prefix=$DESTDIR$prefix instead - you can now set text/background colors for the loki console via (eg): - settings.terminal.background-color 0x000000 - settings.terminal.foreground-color 0xffffff
2014-02-24 09:39:09 +00:00
}
void pListView::setCheckable(bool checkable) {
ListView_SetExtendedListViewStyle(hwnd, LVS_EX_FULLROWSELECT | LVS_EX_SUBITEMIMAGES | (checkable ? LVS_EX_CHECKBOXES : 0));
}
void pListView::setChecked(unsigned selection, bool checked) {
locked = true;
ListView_SetCheckState(hwnd, selection, checked);
locked = false;
}
Update to v094r08 release. byuu says: Lots of changes this time around. FreeBSD stability and compilation is still a work in progress. FreeBSD 10 + Clang 3.3 = 108fps FreeBSD 10 + GCC 4.7 = 130fps Errata 1: I've been fighting that god-damned endian.h header for the past nine WIPs now. The above WIP isn't building now because FreeBSD isn't including headers before using certain types, and you end up with a trillion error messages. So just delete all the endian.h includes from nall/intrinsics.hpp to build. Errata 2: I was trying to match g++ and g++47, so I used $(findstring g++,$(compiler)), which ends up also matching clang++. Oops. Easy fix, put Clang first and then else if g++ next. Not ideal, but oh well. All it's doing for now is declaring -fwrapv twice, so you don't have to fix it just yet. Probably just going to alias g++="g++47" and do exact matching instead. Errata 3: both OpenGL::term and VideoGLX::term are causing a core dump on BSD. No idea why. The resources are initialized and valid, but releasing them crashes the application. Changelog: - nall/Makefile is more flexible with overriding $(compiler), so you can build with GCC or Clang on BSD (defaults to GCC now) - PLATFORM_X was renamed to PLATFORM_XORG, and it's also declared with PLATFORM_LINUX or PLATFORM_BSD - PLATFORM_XORG probably isn't the best name ... still thinking about what best to call LINUX|BSD|SOLARIS or ^(WINDOWS|MACOSX) - fixed a few legitimate Clang warning messages in nall - Compiler::VisualCPP is ugly as hell, renamed to Compiler::CL - nall/platform includes nall/intrinsics first. Trying to move away from testing for _WIN32, etc directly in all files. Work in progress. - nall turns off Clang warnings that I won't "fix", because they aren't broken. It's much less noisy to compile with warnings on now. - phoenix gains the ability to set background and foreground colors on various text container widgets (GTK only for now.) - rewrote a lot of the MSU1 code to try and simplify it. Really hope I didn't break anything ... I don't have any MSU1 test ROMs handy - SNES coprocessor audio is now mixed as sclamp<16>(system_sample + coprocessor_sample) instead of sclamp<16>((sys + cop) / 2) - allows for greater chance of aliasing (still low, SNES audio is quiet), but doesn't cut base system volume in half anymore - fixed Super Scope and Justifier cursor colors - use input.xlib instead of input.x ... allows Xlib input driver to be visible on Linux and BSD once again - make install and make uninstall must be run as root again; no longer using install but cp instead for BSD compatibility - killed $(DESTDIR) ... use make prefix=$DESTDIR$prefix instead - you can now set text/background colors for the loki console via (eg): - settings.terminal.background-color 0x000000 - settings.terminal.foreground-color 0xffffff
2014-02-24 09:39:09 +00:00
void pListView::setForegroundColor(Color color) {
}
void pListView::setGeometry(Geometry geometry) {
pWidget::setGeometry(geometry);
autoSizeColumns();
}
void pListView::setHeaderText(const lstring& list) {
while(ListView_DeleteColumn(hwnd, 0));
lstring headers = list;
if(headers.size() == 0) headers.append(""); //must have at least one column
for(unsigned n = 0; n < headers.size(); n++) {
LVCOLUMN column;
column.mask = LVCF_FMT | LVCF_TEXT | LVCF_SUBITEM;
column.fmt = LVCFMT_LEFT;
column.iSubItem = n;
utf16_t headerText(headers[n]);
column.pszText = headerText;
ListView_InsertColumn(hwnd, n, &column);
}
autoSizeColumns();
}
void pListView::setHeaderVisible(bool visible) {
SetWindowLong(
hwnd, GWL_STYLE,
(GetWindowLong(hwnd, GWL_STYLE) & ~LVS_NOCOLUMNHEADER) |
(visible ? 0 : LVS_NOCOLUMNHEADER)
);
}
void pListView::setImage(unsigned selection, unsigned position, const image& image) {
//assign existing image
for(unsigned n = 0; n < images.size(); n++) {
if(images[n] == image) {
imageMap(selection)(position) = n;
return ListView_SetImage(hwnd, imageList, selection, position, n);
}
}
//append and assign new image
imageMap(selection)(position) = images.size();
images.append(image);
ImageList_Append(imageList, image, 15);
ListView_SetImage(hwnd, imageList, selection, position, imageMap(selection)(position));
}
void pListView::setSelected(bool selected) {
locked = true;
lostFocus = false;
if(selected == false) {
ListView_SetItemState(hwnd, -1, 0, LVIS_FOCUSED | LVIS_SELECTED);
} else {
setSelection(listView.state.selection);
}
locked = false;
}
void pListView::setSelection(unsigned selection) {
locked = true;
lostFocus = false;
ListView_SetItemState(hwnd, selection, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);
locked = false;
}
void pListView::setText(unsigned selection, unsigned position, string text) {
utf16_t wtext(text);
ListView_SetItemText(hwnd, selection, position, wtext);
}
void pListView::constructor() {
lostFocus = false;
hwnd = CreateWindowEx(
WS_EX_CLIENTEDGE, WC_LISTVIEW, L"",
WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | LVS_NOCOLUMNHEADER,
0, 0, 0, 0, parentHwnd, (HMENU)id, GetModuleHandle(0), 0
);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)&listView);
setDefaultFont();
setHeaderText(listView.state.headerText);
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
setBackgroundColor(listView.state.backgroundColor);
setHeaderVisible(listView.state.headerVisible);
setCheckable(listView.state.checkable);
for(auto& text : listView.state.text) append(text);
for(unsigned n = 0; n < listView.state.checked.size(); n++) setChecked(n, listView.state.checked[n]);
buildImageList();
if(listView.state.selected) setSelection(listView.state.selection);
autoSizeColumns();
synchronize();
}
void pListView::destructor() {
DestroyWindow(hwnd);
}
void pListView::orphan() {
destructor();
constructor();
}
void pListView::buildImageList() {
auto& list = listView.state.image;
unsigned columns = listView.state.text.size();
unsigned rows = max(1u, listView.state.headerText.size());
ListView_SetImageList(hwnd, NULL, LVSIL_SMALL);
if(imageList) ImageList_Destroy(imageList);
imageList = ImageList_Create(15, 15, ILC_COLOR32, 1, 0);
imageMap.reset();
images.reset();
images.append(nall::image()); //empty icon for cells without an image assigned (I_IMAGENONE does not work)
//create a vector of unique images from all images used (many cells may use the same image)
for(unsigned y = 0; y < list.size(); y++) {
for(unsigned x = 0; x < list[y].size(); x++) {
bool found = false;
for(unsigned z = 0; z < images.size(); z++) {
if(list[y][x] == images[z]) {
found = true;
imageMap(y)(x) = z;
break;
}
}
if(found == false) {
imageMap(y)(x) = images.size();
images.append(list[y][x]);
}
}
}
//build image list
for(auto& imageItem : images) ImageList_Append(imageList, imageItem, 15);
if(images.size() <= 1) return;
//set images for all cells
for(unsigned y = 0; y < columns; y++) {
for(unsigned x = 0; x < rows; x++) {
ListView_SetImage(hwnd, imageList, y, x, imageMap(y)(x));
}
}
}
void pListView::onActivate(LPARAM lparam) {
LPNMLISTVIEW nmlistview = (LPNMLISTVIEW)lparam;
if(listView.state.text.empty() || !listView.state.selected) return;
//LVN_ITEMACTIVATE is not re-entrant until DispatchMessage() completes
//if(listView.onActivate) listView.onActivate();
Update to v094 release. byuu says: This release adds support for game libraries, and substantially improves Game Boy and Game Boy Color emulation with cycle-based renderers. Many other changes are also present. It's very important to note that this release now defaults to optimal drivers rather than safe drivers. This is particularly important if you do not have strong OpenGL 3.2 drivers. If performance is bad, go to Settings -> Configuration -> Advanced, change the video driver, and restart higan. In the rare case that you have trouble opening higan, you can edit settings.bml directly and change the setting there. The Windows safe driver is Direct3D, and the Linux safe driver is XShm. Also note that although display emulation shaders are now supported, they have not been included in this release as they are not ready yet. The support has been built-in anyway, so that they can be tested by everyone. Once refined, future releases of higan will come with built-in shaders for each emulated system that simulates the unique display characteristics of each. Changelog (since v093): - sfc: added SA-1 MDR support (fixes SD Gundam G-Next bug) - sfc: remove random/ and config/, merge to system/ with better randomization - gb: improved color emulation palette contrast - gbc: do not sort sprites by X-priority - gbc: allow transparency on BG priority pixels - gbc: VRAM DMA timing and register fixes - gbc: block invalid VRAM DMA transfer source and target addresses - gba: added LCD color emulation (without it, colors are grossly over-saturated) - gba: removed internal frame blending (use shaders to simulate motion blur if desired) - gba: added Game Boy Player support (adds joypad rumble support to supported games) - gba: SOUND_CTL_H is readable - gb/gbc: PPU renderer is now cycle-based (major accuracy improvement) - gb/gbc: OAM DMA runs in parallel with the CPU - gb/gbc: only HRAM can be accessed during OAM DMA - gb/gbc: fixed serialization of games with SRAM - gb/gbc: disallow up+down or left+right at the same time - gb/gbc: added weak hipass filter to remove DC bias - gb/gbc: STAT OAM+Hblank IRQs only trigger during active display - gb/gbc: fixed underflow in window clamping - gb/gbc/gba: audio mixes internally at 2MHz now instead of 4MHz (does not affect accuracy) - gb/gbc/gba: audio volume reduced for consistency with other systems - fc/sfc/gb/gbc/gba: cheat codes are now stored in universal, decrypted format - ethos: replaced file loader with a proper game library - ethos: added display emulation shader support - ethos: added color emulation option to video settings - ethos: program icon upgraded from 48x48 to 512x512 - ethos: settings and tools windows now use tab frames (less wasted screen space) - ethos: default to optimal (video, audio, input) drivers instead of safest drivers - ethos: input mapping system completely rewritten to support hotplugging and unique device mappings - ruby: added fixes for OpenGL 3.2 on AMD graphics cards - ruby: quark shaders now support user settings inside of manifest - ruby: quark shaders can use integral textures (allows display emulation shaders to work with raw colors) - ruby: add joypad rumble support - ruby: XInput (Xbox 360) controllers now support hotplugging - ruby: added Linux udev joypad driver with hotplug support - phoenix: fixed a rare null pointer dereference issue on Windows - port: target -std=c++11 instead of -std=gnu++11 (do not rely on GNU C++ extensions) - port: added out-of-the-box compilation support for BSD/Clang 3.3+ - port: applied a few Debian upstream patches - cheats: updated to mightymo's 2014-01-02 release; decrypted all Game Genie codes
2014-01-20 08:55:17 +00:00
PostMessage(parentHwnd, WM_APP + AppMessage::ListView_onActivate, 0, (LPARAM)&listView);
}
void pListView::onChange(LPARAM lparam) {
LPNMLISTVIEW nmlistview = (LPNMLISTVIEW)lparam;
if(!(nmlistview->uChanged & LVIF_STATE)) return;
unsigned selection = nmlistview->iItem;
unsigned imagemask = ((nmlistview->uNewState & LVIS_STATEIMAGEMASK) >> 12) - 1;
if(imagemask == 0 || imagemask == 1) {
if(!locked) {
listView.state.checked[selection] = !listView.state.checked[selection];
if(listView.onToggle) listView.onToggle(selection);
}
} else if((nmlistview->uOldState & LVIS_FOCUSED) && !(nmlistview->uNewState & LVIS_FOCUSED)) {
lostFocus = true;
listView.state.selected = false;
listView.state.selection = 0;
} else if(!(nmlistview->uOldState & LVIS_SELECTED) && (nmlistview->uNewState & LVIS_SELECTED)) {
lostFocus = false;
listView.state.selected = true;
listView.state.selection = selection;
if(!locked && listView.onChange) listView.onChange();
} else if(!lostFocus && !listView.state.selected) {
lostFocus = false;
listView.state.selected = false;
listView.state.selection = 0;
if(!locked && listView.onChange) listView.onChange();
} else if(listView.selected() && ListView_GetSelectedCount(hwnd) == 0) {
listView.state.selected = false;
listView.state.selection = 0;
if(!locked && listView.onChange) listView.onChange();
}
}
LRESULT pListView::onCustomDraw(LPARAM lparam) {
LPNMLVCUSTOMDRAW lvcd = (LPNMLVCUSTOMDRAW)lparam;
switch(lvcd->nmcd.dwDrawStage) {
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
case CDDS_PREPAINT: {
return CDRF_NOTIFYITEMDRAW;
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
}
case CDDS_ITEMPREPAINT: {
Color& background = listView.state.backgroundColor;
Color& foreground = listView.state.foregroundColor;
lvcd->clrText = RGB(foreground.red, foreground.green, foreground.blue);
lvcd->clrTextBk = RGB(background.red, background.green, background.blue);
if(listView.state.headerText.size() >= 2 && lvcd->nmcd.dwItemSpec % 2) {
//draw alternating row colors if there are two or more columns
lvcd->clrTextBk = RGB(max(0, (signed)background.red - 17), max(0, (signed)background.green - 17), max(0, (signed)background.blue - 17));
}
return CDRF_DODEFAULT;
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
}
default: {
return CDRF_DODEFAULT;
}
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
}
}
}