mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2025-03-02 15:25:38 +00:00

byuu says (in the thread about rewriting Phoenix): - added phoenix/reference; a dummy implementation that contains the 22KB of static boilerplate code needed to start a new target - OS::setDefaultFont removed; problem is that objects in the global scope are constructed before you can call that function - added Window::setWidgetFont, which is applied if your widgets have no custom font set already upon attaching them to the window with Window::setLayout, more understandable behavior - renamed ListBox to ListView byuu says (in the v075 WIP thread): Found the source of lag on cartridge load. ListView::modify() was not locking Qt messages, so it was causing a CheatEditor::refresh (copies 16MB of memory each call) for all 128 cheat items. Final issue now is that nested submenus (menus inside of menus) are not applying Window::setMenuFont yet.
77 lines
1.5 KiB
C++
Executable File
77 lines
1.5 KiB
C++
Executable File
#include <snes/snes.hpp>
|
|
|
|
#include <nall/base64.hpp>
|
|
#include <nall/config.hpp>
|
|
#include <nall/directory.hpp>
|
|
#include <nall/filemap.hpp>
|
|
#include <nall/input.hpp>
|
|
#include <nall/ups.hpp>
|
|
#include <nall/snes/cartridge.hpp>
|
|
#include <nall/gameboy/cartridge.hpp>
|
|
using namespace nall;
|
|
|
|
#include <ruby/ruby.hpp>
|
|
using namespace ruby;
|
|
|
|
#include <phoenix/phoenix.hpp>
|
|
using namespace phoenix;
|
|
|
|
struct TopLevelWindow : Window {
|
|
string name;
|
|
string position;
|
|
};
|
|
|
|
#include "interface.hpp"
|
|
#include "config.hpp"
|
|
#include "general/general.hpp"
|
|
#include "settings/settings.hpp"
|
|
#include "tools/tools.hpp"
|
|
#include "input/input.hpp"
|
|
#include "utility/utility.hpp"
|
|
#include "cartridge/cartridge.hpp"
|
|
|
|
#if defined(DEBUGGER)
|
|
#include "debugger/debugger.hpp"
|
|
#endif
|
|
|
|
struct Application {
|
|
Font proportionalFont;
|
|
Font proportionalFontBold;
|
|
Font monospaceFont;
|
|
|
|
bool pause;
|
|
bool quit;
|
|
void main(int argc, char **argv);
|
|
|
|
void addWindow(TopLevelWindow *window, const string &name, const string &position);
|
|
Application();
|
|
|
|
private:
|
|
array<TopLevelWindow*> windows;
|
|
configuration geometryConfig;
|
|
void loadGeometry();
|
|
void saveGeometry();
|
|
};
|
|
|
|
extern Application application;
|
|
|
|
struct Style {
|
|
enum : unsigned {
|
|
#if defined(PLATFORM_WIN)
|
|
ButtonHeight = 25,
|
|
CheckBoxHeight = 15,
|
|
ComboBoxHeight = 22,
|
|
LabelHeight = 15,
|
|
SliderHeight = 25,
|
|
LineEditHeight = 22,
|
|
#else
|
|
ButtonHeight = 25,
|
|
CheckBoxHeight = 15,
|
|
ComboBoxHeight = 22,
|
|
LabelHeight = 15,
|
|
SliderHeight = 22,
|
|
LineEditHeight = 22,
|
|
#endif
|
|
};
|
|
};
|