2015-06-12 13:14:38 +00:00
|
|
|
#if defined(Hiro_Window)
|
|
|
|
|
|
|
|
namespace hiro {
|
|
|
|
|
|
|
|
struct pWindow : pObject {
|
|
|
|
Declare(Window, Object)
|
|
|
|
|
|
|
|
auto append(sLayout layout) -> void;
|
|
|
|
auto append(sMenuBar menuBar) -> void;
|
|
|
|
auto append(sStatusBar statusBar) -> void;
|
|
|
|
auto focused() const -> bool override;
|
|
|
|
auto frameMargin() const -> Geometry;
|
|
|
|
auto remove(sLayout layout) -> void;
|
|
|
|
auto remove(sMenuBar menuBar) -> void;
|
|
|
|
auto remove(sStatusBar statusBar) -> void;
|
|
|
|
auto setBackgroundColor(Color color) -> void;
|
Update to v103r13 release.
byuu says:
Changelog:
- gb/interface: fix Game Boy Color extension to be "gbc" and not "gb"
[hex\_usr]
- ms/interface: move Master System hardware controls below controller
ports
- sfc/ppu: improve latching behavior of BGnHOFS registers (not
hardware verified) [AWJ]
- tomoko/input: rework port/device mapping to support non-sequential
ports and devices¹
- todo: should add move() to inputDevice.mappings.append and
inputPort.devices.append
- note: there's a weird GCC 4.9 bug with brace initialization of
InputEmulator; have to assign each field separately
- tomoko: all windows sans the main presentation window can be
dismissed with the escape key
- icarus: the single file selection dialog ("Load ROM Image...") can
be dismissed with the escape key
- tomoko: do not pause emulation when FocusLoss/Pause is set during
exclusive fullscreen mode
- hiro/(windows,gtk,qt): implemented Window::setDismissable() function
(missing from cocoa port, sorry)
- nall/string: fixed printing of largest possible negative numbers (eg
`INT_MIN`) [Sintendo]
- only took eight months! :D
¹: When I tried to move the Master System hardware port below the
controller ports, I ran into a world of pain.
The input settings list expects every item in the
`InputEmulator<InputPort<InputDevice<InputMapping>>>>` arrays to be
populated with valid results. But these would be sparsely populated
based on the port and device IDs from inside higan. And that is done so
that the Interface::inputPoll can have O(1) lookup of ports and devices.
This worked because all the port and device IDs were sequential (they
left no gaps in the maps upon creating the lists.)
Unfortunately by changing the expectation of port ID to how it appears
in the list, inputs would not poll correctly. By leaving them alone and
just moving Hardware to the third position, the Game Gear would be
missing port IDs of 0 and 1 (the controller ports of the Master System).
Even by trying to make separate MasterSystemHardware and
GameGearHardware ports, things still fractured when the devices were no
longer contigious.
I got pretty sick of this and just decided to give up on O(1)
port/device lookup, and moved to O(n) lookup. It only knocked the
framerate down by maybe one frame per second, enough to be in the margin
of error. Inputs aren't polled *that* often for loops that usually
terminate after 1-2 cycles to be too detrimental to performance.
So the new input system now allows non-sequential port and device IDs.
Remember that I killed input IDs a while back. There's never any reason
for those to need IDs ... it was easier to just order the inputs in the
order you want to see them in the user interface. So the input lookup is
still O(1). Only now, everything's safer and I return a
maybe<InputMapping&>, and won't crash out the program trying to use a
mapping that isn't found for some reason.
Errata: the escape key isn't working on the browser/message dialogs on
Windows, because of course nothing can ever just be easy and work for
me. If anyone else wouldn't mind looking into that, I'd greatly
appreciate it.
Having the `WM_KEYDOWN` test inside the main `Application_sharedProc`, it
seems to not respond to the escape key on modal dialogs. If I put the
`WM_KEYDOWN` test in the main window proc, then it doesn't seem to get
called for `VK_ESCAPE` at all, and doesn't get called period for modal
windows. So I'm at a loss and it's past 4AM here >_>
2017-07-12 08:24:27 +00:00
|
|
|
auto setDismissable(bool dismissable) -> void;
|
2015-06-12 13:14:38 +00:00
|
|
|
auto setDroppable(bool droppable) -> void;
|
|
|
|
auto setEnabled(bool enabled) -> void;
|
|
|
|
auto setFocused() -> void;
|
Update to v094r43 release.
byuu says:
Updated to compile with all of the new hiro changes. My next step is to
write up hiro API documentation, and move the API from alpha (constantly
changing) to beta (rarely changing), in preparation for the first stable
release (backward-compatible changes only.)
Added "--fullscreen" command-line option. I like this over
a configuration file option. Lets you use the emulator in both modes
without having to modify the config file each time.
Also enhanced the command-line game loading. You can now use any of
these methods:
higan /path/to/game-folder.sfc
higan /path/to/game-folder.sfc/
higan /path/to/game-folder.sfc/program.rom
The idea is to support launchers that insist on loading files only.
Technically, the file can be any name (manifest.bml also works); the
only criteria is that the file actually exists and is a file, and not
a directory. This is a requirement to support the first version (a
directory lacking the trailing / identifier), because I don't want my
nall::string class to query the file system to determine if the string
is an actual existing file or directory for its pathname() / dirname()
functions.
Anyway, every game folder I've made so far has program.rom, and that's
very unlikely to change, so this should be fine.
Now, of course, if you drop a regular "game.sfc" file on the emulator,
it won't even try to load it, unless it's in a folder that ends in .fc,
.sfc, etc. In which case, it'll bail out immediately by being unable to
produce a manifest for what is obviously not really a game folder.
2015-08-30 02:08:26 +00:00
|
|
|
auto setFont(const Font& font) -> void override;
|
2015-06-12 13:14:38 +00:00
|
|
|
auto setFullScreen(bool fullScreen) -> void;
|
|
|
|
auto setGeometry(Geometry geometry) -> void;
|
|
|
|
auto setModal(bool modal) -> void;
|
|
|
|
auto setResizable(bool resizable) -> void;
|
|
|
|
auto setTitle(string text) -> void;
|
|
|
|
auto setVisible(bool visible) -> void;
|
|
|
|
|
|
|
|
auto onClose() -> void;
|
|
|
|
auto onDrop(WPARAM wparam) -> void;
|
|
|
|
auto onEraseBackground() -> bool;
|
|
|
|
auto onModalBegin() -> void;
|
|
|
|
auto onModalEnd() -> void;
|
|
|
|
auto onMove() -> void;
|
|
|
|
auto onSize() -> void;
|
|
|
|
|
|
|
|
auto _geometry() -> Geometry;
|
2015-06-15 22:16:43 +00:00
|
|
|
auto _modalityCount() -> unsigned;
|
|
|
|
auto _modalityDisabled() -> bool;
|
|
|
|
auto _modalityUpdate() -> void;
|
2015-06-12 13:14:38 +00:00
|
|
|
|
|
|
|
HWND hwnd = nullptr;
|
|
|
|
HFONT hstatusfont = nullptr;
|
|
|
|
HBRUSH hbrush = nullptr;
|
|
|
|
COLORREF hbrushColor = 0;
|
2015-08-24 09:42:11 +00:00
|
|
|
Geometry windowedGeometry{128, 128, 256, 256};
|
2015-06-12 13:14:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|