Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.16.1 🎉 #378

Merged
merged 5 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion emulator/include/Emulator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ class OswEmulator {

static OswEmulator* instance; // "Singleton"
const bool isHeadless;
const bool isSoftwareRenderer;
bool autoWakeUp = true;

OswEmulator(bool headless, std::string configPath = "config.json", std::string imguiPath = "imgui.ini");
OswEmulator(bool softwareRenderer, bool headless, std::string configPath = "config.json", std::string imguiPath = "imgui.ini");
~OswEmulator();

void run();
Expand Down
2 changes: 1 addition & 1 deletion emulator/lib/ArduinoJson
Submodule ArduinoJson updated 409 files
2 changes: 1 addition & 1 deletion emulator/lib/ImGUI
Submodule ImGUI updated 94 files
+1 −0 .github/ISSUE_TEMPLATE/config.yml
+90 −0 .github/ISSUE_TEMPLATE/issue_template.yml
+0 −46 .github/issue_template.md
+9 −9 .github/workflows/build.yml
+1 −1 .github/workflows/static-analysis.yml
+1 −2 .gitignore
+1 −1 LICENSE.txt
+16 −8 backends/imgui_impl_allegro5.cpp
+8 −2 backends/imgui_impl_allegro5.h
+22 −12 backends/imgui_impl_android.cpp
+10 −3 backends/imgui_impl_android.h
+13 −5 backends/imgui_impl_dx10.cpp
+9 −3 backends/imgui_impl_dx10.h
+13 −5 backends/imgui_impl_dx11.cpp
+9 −3 backends/imgui_impl_dx11.h
+13 −5 backends/imgui_impl_dx12.cpp
+8 −2 backends/imgui_impl_dx12.h
+35 −5 backends/imgui_impl_dx9.cpp
+9 −3 backends/imgui_impl_dx9.h
+73 −19 backends/imgui_impl_glfw.cpp
+13 −2 backends/imgui_impl_glfw.h
+10 −2 backends/imgui_impl_glut.cpp
+9 −3 backends/imgui_impl_glut.h
+11 −3 backends/imgui_impl_metal.h
+13 −5 backends/imgui_impl_metal.mm
+14 −10 backends/imgui_impl_opengl2.cpp
+9 −3 backends/imgui_impl_opengl2.h
+42 −27 backends/imgui_impl_opengl3.cpp
+8 −2 backends/imgui_impl_opengl3.h
+14 −7 backends/imgui_impl_opengl3_loader.h
+8 −2 backends/imgui_impl_osx.h
+25 −17 backends/imgui_impl_osx.mm
+161 −54 backends/imgui_impl_sdl2.cpp
+14 −5 backends/imgui_impl_sdl2.h
+186 −71 backends/imgui_impl_sdl3.cpp
+15 −2 backends/imgui_impl_sdl3.h
+15 −10 backends/imgui_impl_sdlrenderer2.cpp
+11 −0 backends/imgui_impl_sdlrenderer2.h
+18 −14 backends/imgui_impl_sdlrenderer3.cpp
+11 −0 backends/imgui_impl_sdlrenderer3.h
+249 −159 backends/imgui_impl_vulkan.cpp
+40 −16 backends/imgui_impl_vulkan.h
+62 −28 backends/imgui_impl_wgpu.cpp
+27 −3 backends/imgui_impl_wgpu.h
+47 −5 backends/imgui_impl_win32.cpp
+8 −2 backends/imgui_impl_win32.h
+1 −1 docs/BACKENDS.md
+549 −14 docs/CHANGELOG.txt
+12 −11 docs/CONTRIBUTING.md
+2 −2 docs/EXAMPLES.md
+12 −45 docs/FAQ.md
+158 −112 docs/FONTS.md
+23 −17 docs/README.md
+1 −2 docs/TODO.txt
+6 −2 examples/example_allegro5/main.cpp
+6 −1 examples/example_android_opengl3/main.cpp
+6 −2 examples/example_apple_metal/main.mm
+6 −2 examples/example_apple_opengl2/main.mm
+0 −0 examples/example_emscripten_wgpu/Makefile.emscripten
+1 −1 examples/example_emscripten_wgpu/README.md
+179 −145 examples/example_emscripten_wgpu/main.cpp
+2 −2 examples/example_glfw_metal/Makefile
+6 −2 examples/example_glfw_metal/main.mm
+6 −2 examples/example_glfw_opengl2/main.cpp
+1 −1 examples/example_glfw_opengl3/Makefile.emscripten
+9 −2 examples/example_glfw_opengl3/main.cpp
+22 −55 examples/example_glfw_vulkan/main.cpp
+6 −2 examples/example_glut_opengl2/main.cpp
+12 −2 examples/example_sdl2_directx11/main.cpp
+6 −2 examples/example_sdl2_metal/main.mm
+12 −2 examples/example_sdl2_opengl2/main.cpp
+12 −2 examples/example_sdl2_opengl3/main.cpp
+11 −2 examples/example_sdl2_sdlrenderer2/main.cpp
+27 −55 examples/example_sdl2_vulkan/main.cpp
+7 −3 examples/example_sdl3_opengl3/main.cpp
+9 −5 examples/example_sdl3_sdlrenderer3/main.cpp
+6 −2 examples/example_win32_directx10/main.cpp
+6 −2 examples/example_win32_directx11/main.cpp
+6 −2 examples/example_win32_directx12/main.cpp
+6 −2 examples/example_win32_directx9/main.cpp
+14 −10 examples/example_win32_opengl3/main.cpp
+20 −11 imconfig.h
+1,726 −977 imgui.cpp
+435 −330 imgui.h
+636 −253 imgui_demo.cpp
+214 −80 imgui_draw.cpp
+475 −227 imgui_internal.h
+374 −105 imgui_tables.cpp
+591 −264 imgui_widgets.cpp
+76 −72 imstb_textedit.h
+10 −0 misc/cpp/imgui_stdlib.cpp
+8 −1 misc/freetype/README.md
+168 −15 misc/freetype/imgui_freetype.cpp
+4 −3 misc/freetype/imgui_freetype.h
2 changes: 1 addition & 1 deletion emulator/lib/ImGUI_TestEngine
Submodule ImGUI_TestEngine updated 36 files
+1 −1 app_minimal/LICENSE.txt
+19 −2 app_minimal/app_minimal_imconfig.h
+3 −8 app_minimal/app_minimal_main.cpp
+50 −0 app_minimal/build_win64.bat
+79 −0 docs/CHANGELOG.txt
+2 −0 docs/README.md
+1 −1 imgui_test_engine/LICENSE.txt
+76 −43 imgui_test_engine/imgui_capture_tool.cpp
+11 −3 imgui_test_engine/imgui_capture_tool.h
+151 −33 imgui_test_engine/imgui_te_context.cpp
+64 −57 imgui_test_engine/imgui_te_context.h
+341 −156 imgui_test_engine/imgui_te_engine.cpp
+41 −14 imgui_test_engine/imgui_te_engine.h
+29 −25 imgui_test_engine/imgui_te_exporters.cpp
+2 −10 imgui_test_engine/imgui_te_internal.h
+22 −21 imgui_test_engine/imgui_te_perftool.cpp
+50 −34 imgui_test_engine/imgui_te_ui.cpp
+24 −2 imgui_test_engine/imgui_te_utils.cpp
+3 −0 imgui_test_engine/imgui_te_utils.h
+1 −1 imgui_test_suite/LICENSE.txt
+2 −2 imgui_test_suite/Makefile
+50 −0 imgui_test_suite/build_win64.bat
+37 −16 imgui_test_suite/imgui_test_suite.cpp
+1 −2 imgui_test_suite/imgui_test_suite_imconfig.h
+624 −328 imgui_test_suite/imgui_tests_core.cpp
+67 −22 imgui_test_suite/imgui_tests_docking.cpp
+499 −54 imgui_test_suite/imgui_tests_inputs.cpp
+196 −32 imgui_test_suite/imgui_tests_nav.cpp
+230 −3 imgui_test_suite/imgui_tests_tables.cpp
+4 −2 imgui_test_suite/imgui_tests_viewports.cpp
+935 −209 imgui_test_suite/imgui_tests_widgets.cpp
+139 −13 imgui_test_suite/imgui_tests_widgets_inputtext.cpp
+1 −1 imgui_test_suite/thirdparty/implot
+1 −1 shared/LICENSE.txt
+93 −45 shared/imgui_app.cpp
+9 −10 shared/imgui_app.h
5 changes: 3 additions & 2 deletions emulator/src/Emulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void shutdownEmulatorByInterruptSignal(int s) {
called = true;
}

OswEmulator::OswEmulator(bool headless, std::string configPath, std::string imguiPath): isHeadless(headless) {
OswEmulator::OswEmulator(bool softwareRenderer, bool headless, std::string configPath, std::string imguiPath): isHeadless(headless), isSoftwareRenderer(softwareRenderer) {
// Initialize variables
for(size_t i = 0; i < BTN_NUMBER; i++)
this->buttonCheckboxes[i] = false;
Expand All @@ -58,6 +58,7 @@ OswEmulator::OswEmulator(bool headless, std::string configPath, std::string imgu
if(this->isHeadless) {
this->mainSurface = SDL_CreateRGBSurface(0, width, height, 32, 0, 0, 0, 0);
assert(this->mainSurface && "Never fail surface creation");
assert(this->isSoftwareRenderer && "Software renderer is required in headless mode");
this->mainRenderer = SDL_CreateSoftwareRenderer(this->mainSurface);
} else {
// Init the SDL window and renderer
Expand All @@ -70,7 +71,7 @@ OswEmulator::OswEmulator(bool headless, std::string configPath, std::string imgu
SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI
);
assert(this->mainWindow && "Never fail window creation");
this->mainRenderer = SDL_CreateRenderer(this->mainWindow, -1, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED);
this->mainRenderer = SDL_CreateRenderer(this->mainWindow, -1, this->isSoftwareRenderer ? SDL_RENDERER_SOFTWARE : (SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED));
}
assert(this->mainRenderer && "Never fail renderer creation");
fakeDisplayInstance = std::make_unique<FakeDisplay>(DISP_W, DISP_H, this->mainRenderer);
Expand Down
7 changes: 5 additions & 2 deletions emulator/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ int main(int argc, char** argv) {
const std::string argRunUnitTests = "unit_tests";
const std::string argListAllTests = "list_tests";
const std::string argUiTests = "ui_tests";
const std::string argHeadless = "headless";
const std::string argSoftwareRenderer = "software_renderer";
a.add(argRunUnitTests, '\0', "run the unit test framework");
a.add(argListAllTests, '\0', "list all unit and UI tests, one per line");
a.add(argUiTests, '\0', "run emulator with UI tests window");
a.add("headless", '\0', "do not open a window; use software-rendering only"); // Warning: This parameter name is also used in the unit-tests!
a.add(argHeadless, '\0', "do not open a window; also implies --software_renderer"); // Warning: This parameter name is also used in the unit-tests!
a.add(argSoftwareRenderer, '\0', "use software-rendering only");
a.parse_check(argc, argv);

// Initialize SDL
Expand Down Expand Up @@ -60,7 +63,7 @@ int main(int argc, char** argv) {
returnval = UiTests_main();
} else {
// Create and run the emulator
std::unique_ptr<OswEmulator> oswEmu = std::make_unique<OswEmulator>(a.exist("headless"));
std::unique_ptr<OswEmulator> oswEmu = std::make_unique<OswEmulator>(a.exist(argSoftwareRenderer) or a.exist(argHeadless), a.exist(argHeadless));
OswEmulator::instance = oswEmu.get();
oswEmu->run();
OswEmulator::instance = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion emulator/src/tests/uiTests/UiTests_main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int UiTests_main(UiTests_Mode mode = UiTests_Mode::Run) {

const bool isListMode = mode == UiTests_Mode::List;
// Create and run the emulator
std::unique_ptr<OswEmulator> oswEmu = std::make_unique<OswEmulator>(isListMode);
std::unique_ptr<OswEmulator> oswEmu = std::make_unique<OswEmulator>(isListMode, isListMode);
OswEmulator::instance = oswEmu.get();

// Setup test engine
Expand Down
2 changes: 1 addition & 1 deletion emulator/src/tests/unitTests/fixtures/EmulatorFixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class EmulatorFixture {
// Create and run the (headless) emulator
this->configPath = "config_" + std::to_string(rand()) + ".json";
this->imguiPath = "imgui_" + std::to_string(rand()) + ".ini";
oswEmu = std::make_unique<OswEmulator>(headless, this->configPath, this->imguiPath);
oswEmu = std::make_unique<OswEmulator>(headless, headless, this->configPath, this->imguiPath);
OswEmulator::instance = oswEmu.get();
std::thread t([&]() {
try {
Expand Down
2 changes: 1 addition & 1 deletion scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Pillow==9.0.1
pillow==10.2.0
Loading