2011-09-05 03:48:23 +00:00
|
|
|
#include "platform.hpp"
|
2012-01-15 08:29:57 +00:00
|
|
|
#include "utility.cpp"
|
2012-01-26 06:50:09 +00:00
|
|
|
#include "settings.cpp"
|
2012-01-15 08:29:57 +00:00
|
|
|
|
|
|
|
#include "desktop.cpp"
|
|
|
|
#include "keyboard.cpp"
|
|
|
|
#include "mouse.cpp"
|
|
|
|
#include "dialog-window.cpp"
|
|
|
|
#include "message-window.cpp"
|
2011-02-24 09:27:21 +00:00
|
|
|
|
|
|
|
#include "font.cpp"
|
2011-06-05 03:45:04 +00:00
|
|
|
#include "timer.cpp"
|
2011-02-24 09:27:21 +00:00
|
|
|
#include "window.cpp"
|
|
|
|
|
|
|
|
#include "action/action.cpp"
|
|
|
|
#include "action/menu.cpp"
|
2011-02-27 09:05:10 +00:00
|
|
|
#include "action/separator.cpp"
|
|
|
|
#include "action/item.cpp"
|
|
|
|
#include "action/check-item.cpp"
|
|
|
|
#include "action/radio-item.cpp"
|
2011-02-24 09:27:21 +00:00
|
|
|
|
|
|
|
#include "widget/widget.cpp"
|
|
|
|
#include "widget/button.cpp"
|
2011-03-26 11:31:07 +00:00
|
|
|
#include "widget/canvas.cpp"
|
2011-02-24 09:27:21 +00:00
|
|
|
#include "widget/check-box.cpp"
|
|
|
|
#include "widget/combo-box.cpp"
|
|
|
|
#include "widget/hex-edit.cpp"
|
2011-08-06 14:03:52 +00:00
|
|
|
#include "widget/horizontal-scroll-bar.cpp"
|
2011-02-24 09:27:21 +00:00
|
|
|
#include "widget/horizontal-slider.cpp"
|
|
|
|
#include "widget/label.cpp"
|
|
|
|
#include "widget/line-edit.cpp"
|
|
|
|
#include "widget/list-view.cpp"
|
|
|
|
#include "widget/progress-bar.cpp"
|
|
|
|
#include "widget/radio-box.cpp"
|
|
|
|
#include "widget/text-edit.cpp"
|
2011-08-06 14:03:52 +00:00
|
|
|
#include "widget/vertical-scroll-bar.cpp"
|
2011-02-24 09:27:21 +00:00
|
|
|
#include "widget/vertical-slider.cpp"
|
|
|
|
#include "widget/viewport.cpp"
|
|
|
|
|
2012-01-15 08:29:57 +00:00
|
|
|
XlibDisplay* pOS::display = 0;
|
2011-03-22 12:56:49 +00:00
|
|
|
Font pOS::defaultFont;
|
|
|
|
|
2011-02-24 09:27:21 +00:00
|
|
|
void pOS::main() {
|
|
|
|
gtk_main();
|
|
|
|
}
|
|
|
|
|
2011-02-27 09:05:10 +00:00
|
|
|
bool pOS::pendingEvents() {
|
2011-02-24 09:27:21 +00:00
|
|
|
return gtk_events_pending();
|
|
|
|
}
|
|
|
|
|
2011-02-27 09:05:10 +00:00
|
|
|
void pOS::processEvents() {
|
|
|
|
while(pendingEvents()) gtk_main_iteration_do(false);
|
2011-02-24 09:27:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void pOS::quit() {
|
|
|
|
gtk_main_quit();
|
|
|
|
}
|
|
|
|
|
|
|
|
void pOS::initialize() {
|
2012-01-15 08:29:57 +00:00
|
|
|
display = XOpenDisplay(0);
|
|
|
|
|
2011-09-27 11:55:02 +00:00
|
|
|
settings = new Settings;
|
|
|
|
settings->load();
|
2011-02-24 09:27:21 +00:00
|
|
|
|
|
|
|
int argc = 1;
|
|
|
|
char *argv[2];
|
|
|
|
argv[0] = new char[8];
|
|
|
|
argv[1] = 0;
|
|
|
|
strcpy(argv[0], "phoenix");
|
|
|
|
char **argvp = argv;
|
|
|
|
gtk_init(&argc, &argvp);
|
|
|
|
|
Update to v084r05 release.
(note: before the post announcing this release, there had been
a discussion of a performance optimisation that made the Super Scope
emulation a lot faster, but caused problems for the Justifier perpheral)
byuu says:
Spent a good two hours trying things to no avail.
I was trying to allow the CPU to run ahead, and sync on accesses to
$4016/4017/4201/4213, but that doesn't work because the controllers have
access to strobe IObit at will.
The codebase is really starting to get difficult to work with. I am
guessing because the days of massive development are long over, and the
code is starting to age.
Jonas' fix works 98% of the time, but there's still a few missed shots
here and there. So that's not going to work either.
So ... I give up. I've disabled the speed hack, so that it works 100% of
the time.
Did the same for the Super Scope: it may not have the same problem, but
I like consistency and don't feel like taking the chance.
This doesn't affect the mouse, since the mouse does not latch the
counters to indicate its X/Y position.
Speed hit is 92->82fps (accuracy profile), but only for Super Scope and
Justifier games.
But ... at least it works now. Slow and working is better than fast and
broken.
I appreciate the help in researching the issue, Jonas and krom.
Also pulled in phoenix/Makefile, which simplifies ui/Makefile.
Linux port defaults to GTK+ now. I can't get QGtkStyle to look good on
Debian.
2011-12-18 03:19:45 +00:00
|
|
|
gtk_rc_parse_string(R"(
|
|
|
|
style "phoenix-gtk"
|
|
|
|
{
|
|
|
|
GtkWindow::resize-grip-width = 0
|
|
|
|
GtkWindow::resize-grip-height = 0
|
|
|
|
GtkTreeView::vertical-separator = 0
|
|
|
|
GtkComboBox::appears-as-list = 1
|
|
|
|
}
|
|
|
|
class "GtkWindow" style "phoenix-gtk"
|
|
|
|
class "GtkTreeView" style "phoenix-gtk"
|
|
|
|
# class "GtkComboBox" style "phoenix-gtk"
|
|
|
|
)");
|
2012-01-15 08:29:57 +00:00
|
|
|
|
|
|
|
pKeyboard::initialize();
|
2011-02-24 09:27:21 +00:00
|
|
|
}
|