{"action":"created","issue":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3261","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3261/labels{/name}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3261/comments","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3261/events","html_url":"https://github.com/dolphin-emu/dolphin/pull/3261","id":116987708,"number":3261,"title":"[RFC] DolphinQt","user":{"login":"spxtr","id":7368979,"avatar_url":"https://avatars.githubusercontent.com/u/7368979?v=3","gravatar_id":"","url":"https://api.github.com/users/spxtr","html_url":"https://github.com/spxtr","followers_url":"https://api.github.com/users/spxtr/followers","following_url":"https://api.github.com/users/spxtr/following{/other_user}","gists_url":"https://api.github.com/users/spxtr/gists{/gist_id}","starred_url":"https://api.github.com/users/spxtr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spxtr/subscriptions","organizations_url":"https://api.github.com/users/spxtr/orgs","repos_url":"https://api.github.com/users/spxtr/repos","events_url":"https://api.github.com/users/spxtr/events{/privacy}","received_events_url":"https://api.github.com/users/spxtr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-15T11:27:01Z","updated_at":"2015-11-15T13:11:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3261","html_url":"https://github.com/dolphin-emu/dolphin/pull/3261","diff_url":"https://github.com/dolphin-emu/dolphin/pull/3261.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/3261.patch"},"body":"Sorry about the second PR, but something was very wrong with the last one, #3221.\r\n\r\nI wasn't happy with the current state of DolphinQt, so I rewrote the majority of it from scratch. At this point it seems stable and easily extensible. The rough architecture looks like this, from the bottom up:\r\n\r\n* `GameTracker` watches the given directories. If a game file is added, (re)moved, or modified, it gets loaded in a separate thread and sent up to the `GameList`. Adding a directory with a hundred games in it won't freeze the GUI for several seconds now!\r\n* I more or less liked how the current DolphinQt does `GameFile`, so I didn't change it  much. I haven't added caching and XML support yet; it will look pretty much like what's already there.\r\n* `GameList` contains two views for `GameListModel`, the standard DolphinWX table view and the icon and name view that's in the current DolphinQt. The table view can be sorted by any column, including those where you only see an icon such as emulator state, platform, or country.\r\n* `Host` is a singleton that allows for the core send messages to and from the GUI. Currently I only implement a few of the functions. Some of them, such as `Host_RequestFullscreen`, should probably not exist. It's pretty clearly not the core's job to ask the GUI to go fullscreen. They are also sent to the `Host` from the `RenderWidget`'s event handler and stored in the `Host`.\r\n* `MainWindow` ties the various bits together. It has the logic for Start/Pause/Stop as well as the `RenderWidget`'s display methods. All the toolbuttons except for config buttons work. Notably, the Full Screen button works as expected, and the `RenderWidget` can be in its own window, in the main window, or fullscreen, depending on what's in `SConfig`. Most of the menu is unimplemented.\r\n\r\n![ss](https://cloud.githubusercontent.com/assets/7368979/11168354/ebc04a9c-8b40-11e5-93e0-86e10903c9bf.jpg)\r\n\r\nSome Qt particulars:\r\n\r\n* It can sometimes be easy to leak memory. Parents will delete their children at the right moments, but sometimes things take ownership of other things and sometimes they release ownership and that can get confusing. I've tried to get it right here, but haven't tested with valgrind.\r\n* Qt implicitly shares most data classes. That is, there's almost no overhead to passing an enormous `QString` as an argument to another function, because it obeys copy-on-write semantics. Neat!\r\n* `QObject`s have a thread affinity. That is, their event loop runs in a particular thread. Connected signals/slots will run in that thread, synchronously if they're called from the same thread, or async if called from another thread. This is really nice, since it means we don't need to lock `QObject`s that only communicate with other QObjects through signals/slots.\r\n\r\n![ss2](https://cloud.githubusercontent.com/assets/7368979/11168355/ee451c7a-8b40-11e5-8d52-6d0ff88d3698.jpg)\r\n\r\nNext steps:\r\n\r\n* Qt has a nice testing module that allows for simulated key presses, button clicks, etc.\r\n* The current Windows build doesn't statically link Qt5 into the executable. I don't have access to a Windows machine and I *really* don't want to install Visual Studio on my Windows VM. Can someone help me out here?\r\n* Finish `GameFile` to use caches and support XML, ELF, DOL, etc. I should also remember the last selected file and reselect it if it changes. These are the last important features that the current DolphinQt implements that I don't.\r\n* The only other one that comes to mind is the tree view, which I don't really like. It's not a real tree view, you see. If you have a folder within a folder and are tracking both, the inner folder won't appear as a subtree of the outer one. If that is desired behavior then I can add it in.\r\n* Store toolbutton icons in `Resources`.\r\n* Config dialogs will be a fair amount of work. I'd like more comments on what I have now before I tackle those.\r\n\r\nAssuming testing goes well, this should be ready for merge soon. I'm perfectly willing to do the vast majority of the work on finishing this thing and seeing WX out the door, but I need feedback as I go. I would greatly appreciate it if you lovely folks could play with it a bit and let me know about any issues or suggestions. The current DolphinQt found its way in despite an [obvious compiler warning](https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/DolphinQt/GameList/GameFile.h#L38) and a core dump when it quits. I should hope someone at least compiles my code before merging it."},"comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments/156810610","html_url":"https://github.com/dolphin-emu/dolphin/pull/3261#issuecomment-156810610","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3261","id":156810610,"user":{"login":"JosJuice","id":6716818,"avatar_url":"https://avatars.githubusercontent.com/u/6716818?v=3","gravatar_id":"","url":"https://api.github.com/users/JosJuice","html_url":"https://github.com/JosJuice","followers_url":"https://api.github.com/users/JosJuice/followers","following_url":"https://api.github.com/users/JosJuice/following{/other_user}","gists_url":"https://api.github.com/users/JosJuice/gists{/gist_id}","starred_url":"https://api.github.com/users/JosJuice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosJuice/subscriptions","organizations_url":"https://api.github.com/users/JosJuice/orgs","repos_url":"https://api.github.com/users/JosJuice/repos","events_url":"https://api.github.com/users/JosJuice/events{/privacy}","received_events_url":"https://api.github.com/users/JosJuice/received_events","type":"User","site_admin":false},"created_at":"2015-11-15T13:11:39Z","updated_at":"2015-11-15T13:11:39Z","body":"Well yes, it is related to a problem with the state of DolphinQt, and that is that almost nobody is working on it. This PR doesn't change that (except for the fact that you now are working on DolphinQt, which is nice).\r\n\r\nI can't comment on the other parts of DolphinQt, sorry."}}