Update to v094r20 release.
byuu says:
Main reason for this WIP was because of all the added lines to hiro for
selective component disabling. May as well get all the diff-noise apart
from code changes.
It also merges something I've been talking to Cydrak about ... making
nall::string::(integer,decimal) do built-in binary,octal,hex decoding
instead of just failing on those. This will have fun little side effects
all over the place, like being able to view a topic on my forum via
"forum.byuu.org/topic/0b10010110", heh.
There are two small changes to higan itself, though. First up, I fixed
the resampler ratio when loading non-SNES games. Tested and I can play
Game Boy games fine now. Second, I hooked up menu option hiding for
reset and controller selection. Right now, this works like higan v094,
but I'm thinking I might want to show the "Device -> Controller" even if
that's all that's there. It kind of jives nicer with the input settings
window to see the labels there, I think. And if we ever do add more
stuff, it'll be nice that people already always expect that menu there.
Remaining issues:
* add slotted cart loader (SGB, BSX, ST)
* add DIP switch selection window (NSS)
* add timing configuration (video/audio sync)
2015-05-23 05:37:08 +00:00
|
|
|
#if defined(Hiro_HorizontalLayout)
|
|
|
|
|
2015-06-15 22:16:43 +00:00
|
|
|
auto mHorizontalLayout::append(sSizable sizable, Size size, signed spacing) -> type& {
|
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
|
|
|
properties.append({size.width(), size.height(), spacing < 0 ? settings.spacing : spacing});
|
|
|
|
mLayout::append(sizable);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto mHorizontalLayout::minimumSize() const -> Size {
|
|
|
|
signed width = 0, height = 0;
|
|
|
|
|
|
|
|
for(auto n : range(sizables())) {
|
|
|
|
auto& child = properties[sizable(n)->offset()];
|
|
|
|
if(child.width == Size::Minimum || child.width == Size::Maximum) {
|
|
|
|
width += sizable(n)->minimumSize().width();
|
|
|
|
} else {
|
|
|
|
width += child.width;
|
|
|
|
}
|
|
|
|
if(&child != &properties.last()) width += child.spacing;
|
|
|
|
}
|
|
|
|
|
|
|
|
for(auto n : range(sizables())) {
|
|
|
|
auto& child = properties[sizable(n)->offset()];
|
|
|
|
if(child.height == Size::Minimum || child.height == Size::Maximum) {
|
|
|
|
height = max(height, sizable(n)->minimumSize().height());
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
height = max(height, child.height);
|
|
|
|
}
|
|
|
|
|
|
|
|
return {settings.margin * 2 + width, settings.margin * 2 + height};
|
|
|
|
}
|
|
|
|
|
2015-06-15 22:16:43 +00:00
|
|
|
auto mHorizontalLayout::remove(sSizable sizable) -> type& {
|
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
|
|
|
properties.remove(sizable->offset());
|
|
|
|
mLayout::remove(sizable);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto mHorizontalLayout::reset() -> type& {
|
|
|
|
mLayout::reset();
|
|
|
|
properties.reset();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto mHorizontalLayout::setAlignment(double alignment) -> type& {
|
|
|
|
settings.alignment = max(0.0, min(1.0, alignment));
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto mHorizontalLayout::setEnabled(bool enabled) -> type& {
|
|
|
|
mLayout::setEnabled(enabled);
|
|
|
|
for(auto n : range(sizables())) {
|
Update to v094r22 release.
byuu says:
I fixed the hiro layout enable bug, so when you go to assign joypad
input, the window disables itself so your input doesn't mess with the
controls.
I added "reset" to the hotkeys, in case you feel like clearing all of
them at once.
I added device selection support and the ability to disable audio
synchronization (run > 60fps) to the ruby/OSS driver. This is exposed in
tomoko's configuration file.
I added checks to stringify so that assigning null char* strings to
nall::string won't cause crashes anymore (technically the crash was in
strlen(), which doesn't check for null strings, but whatever ... I'll do
the check myself.)
I hooked up BrowserDialog::folderSelect() to loading slotted media for
now. Tested it by loading a Game Boy game successfully through the Super
Game Boy. Definitely want to write a custom window for this though, that
looks more like the library dialog.
Remaining issues:
- finish slotted cart loader (SGB, BSX, ST)
- add DIP switch selection window (NSS) [I may end up punting this one
to v096]
- add more configuration panels (video, audio, timing)
2015-05-25 12:23:49 +00:00
|
|
|
sizable(n)->setEnabled(sizable(n)->enabled());
|
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
|
|
|
}
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto mHorizontalLayout::setFont(const string& font) -> type& {
|
|
|
|
mLayout::setFont(font);
|
|
|
|
for(auto n : range(sizables())) {
|
Update to v094r22 release.
byuu says:
I fixed the hiro layout enable bug, so when you go to assign joypad
input, the window disables itself so your input doesn't mess with the
controls.
I added "reset" to the hotkeys, in case you feel like clearing all of
them at once.
I added device selection support and the ability to disable audio
synchronization (run > 60fps) to the ruby/OSS driver. This is exposed in
tomoko's configuration file.
I added checks to stringify so that assigning null char* strings to
nall::string won't cause crashes anymore (technically the crash was in
strlen(), which doesn't check for null strings, but whatever ... I'll do
the check myself.)
I hooked up BrowserDialog::folderSelect() to loading slotted media for
now. Tested it by loading a Game Boy game successfully through the Super
Game Boy. Definitely want to write a custom window for this though, that
looks more like the library dialog.
Remaining issues:
- finish slotted cart loader (SGB, BSX, ST)
- add DIP switch selection window (NSS) [I may end up punting this one
to v096]
- add more configuration panels (video, audio, timing)
2015-05-25 12:23:49 +00:00
|
|
|
sizable(n)->setFont(sizable(n)->font());
|
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
|
|
|
}
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto mHorizontalLayout::setGeometry(Geometry containerGeometry) -> type& {
|
|
|
|
mLayout::setGeometry(containerGeometry);
|
|
|
|
|
|
|
|
auto properties = this->properties;
|
|
|
|
for(auto n : range(sizables())) {
|
|
|
|
auto& child = properties[sizable(n)->offset()];
|
|
|
|
if(child.width == Size::Minimum) child.width = sizable(n)->minimumSize().width();
|
|
|
|
if(child.height == Size::Minimum) child.height = sizable(n)->minimumSize().height();
|
|
|
|
}
|
|
|
|
|
|
|
|
Geometry geometry = containerGeometry;
|
|
|
|
geometry.setX (geometry.x() + settings.margin );
|
|
|
|
geometry.setY (geometry.y() + settings.margin );
|
|
|
|
geometry.setWidth (geometry.width() - settings.margin * 2);
|
|
|
|
geometry.setHeight(geometry.height() - settings.margin * 2);
|
|
|
|
|
|
|
|
signed minimumWidth = 0, maximumWidthCounter = 0;
|
|
|
|
for(auto& child : properties) {
|
|
|
|
if(child.width == Size::Maximum) maximumWidthCounter++;
|
|
|
|
if(child.width != Size::Maximum) minimumWidth += child.width;
|
|
|
|
if(&child != &properties.last()) minimumWidth += child.spacing;
|
|
|
|
}
|
|
|
|
|
|
|
|
for(auto& child : properties) {
|
|
|
|
if(child.width == Size::Maximum) child.width = (geometry.width() - minimumWidth) / maximumWidthCounter;
|
|
|
|
if(child.height == Size::Maximum) child.height = geometry.height();
|
|
|
|
}
|
|
|
|
|
|
|
|
signed maximumHeight = 0;
|
|
|
|
for(auto& child : properties) maximumHeight = max(maximumHeight, child.height);
|
|
|
|
|
|
|
|
for(auto n : range(sizables())) {
|
|
|
|
auto& child = properties[sizable(n)->offset()];
|
|
|
|
signed pivot = (maximumHeight - child.height) * settings.alignment;
|
|
|
|
Geometry childGeometry = {geometry.x(), geometry.y() + pivot, child.width, child.height};
|
|
|
|
if(childGeometry.width() < 1) childGeometry.setWidth (1);
|
|
|
|
if(childGeometry.height() < 1) childGeometry.setHeight(1);
|
|
|
|
sizable(n)->setGeometry(childGeometry);
|
|
|
|
|
|
|
|
geometry.setX (geometry.x() + child.width + child.spacing);
|
|
|
|
geometry.setWidth(geometry.width() - child.width + child.spacing);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto mHorizontalLayout::setMargin(signed margin) -> type& {
|
|
|
|
settings.margin = margin;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto mHorizontalLayout::setSpacing(signed spacing) -> type& {
|
|
|
|
settings.spacing = spacing;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto mHorizontalLayout::setVisible(bool visible) -> type& {
|
|
|
|
mLayout::setVisible(visible);
|
|
|
|
for(auto n : range(sizables())) {
|
Update to v094r22 release.
byuu says:
I fixed the hiro layout enable bug, so when you go to assign joypad
input, the window disables itself so your input doesn't mess with the
controls.
I added "reset" to the hotkeys, in case you feel like clearing all of
them at once.
I added device selection support and the ability to disable audio
synchronization (run > 60fps) to the ruby/OSS driver. This is exposed in
tomoko's configuration file.
I added checks to stringify so that assigning null char* strings to
nall::string won't cause crashes anymore (technically the crash was in
strlen(), which doesn't check for null strings, but whatever ... I'll do
the check myself.)
I hooked up BrowserDialog::folderSelect() to loading slotted media for
now. Tested it by loading a Game Boy game successfully through the Super
Game Boy. Definitely want to write a custom window for this though, that
looks more like the library dialog.
Remaining issues:
- finish slotted cart loader (SGB, BSX, ST)
- add DIP switch selection window (NSS) [I may end up punting this one
to v096]
- add more configuration panels (video, audio, timing)
2015-05-25 12:23:49 +00:00
|
|
|
sizable(n)->setVisible(sizable(n)->visible());
|
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
|
|
|
}
|
|
|
|
return *this;
|
|
|
|
}
|
Update to v094r20 release.
byuu says:
Main reason for this WIP was because of all the added lines to hiro for
selective component disabling. May as well get all the diff-noise apart
from code changes.
It also merges something I've been talking to Cydrak about ... making
nall::string::(integer,decimal) do built-in binary,octal,hex decoding
instead of just failing on those. This will have fun little side effects
all over the place, like being able to view a topic on my forum via
"forum.byuu.org/topic/0b10010110", heh.
There are two small changes to higan itself, though. First up, I fixed
the resampler ratio when loading non-SNES games. Tested and I can play
Game Boy games fine now. Second, I hooked up menu option hiding for
reset and controller selection. Right now, this works like higan v094,
but I'm thinking I might want to show the "Device -> Controller" even if
that's all that's there. It kind of jives nicer with the input settings
window to see the labels there, I think. And if we ever do add more
stuff, it'll be nice that people already always expect that menu there.
Remaining issues:
* add slotted cart loader (SGB, BSX, ST)
* add DIP switch selection window (NSS)
* add timing configuration (video/audio sync)
2015-05-23 05:37:08 +00:00
|
|
|
|
|
|
|
#endif
|