simple renames, remove a bunch of emscripten code
This commit is contained in:
19
main.cpp
19
main.cpp
@ -10,7 +10,6 @@
|
||||
// - Introduction, links and more at the top of imgui.cpp
|
||||
|
||||
#include <cstddef>
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
|
||||
#include "lib/backends/imgui_impl_opengl3.h"
|
||||
#include "lib/backends/imgui_impl_sdl2.h"
|
||||
@ -37,11 +36,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// This example can also compile and run with Emscripten! See
|
||||
// 'Makefile.emscripten' for details.
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include "lib/emscripten/emscripten_mainloop_stub.h"
|
||||
#endif
|
||||
|
||||
#include "lib/ImNodeFlow.h"
|
||||
|
||||
@ -95,7 +89,7 @@ int main(int, char **) {
|
||||
(SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE |
|
||||
SDL_WINDOW_ALLOW_HIGHDPI);
|
||||
SDL_Window *window =
|
||||
SDL_CreateWindow("PPD Node", SDL_WINDOWPOS_CENTERED,
|
||||
SDL_CreateWindow("tview", SDL_WINDOWPOS_CENTERED,
|
||||
SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags);
|
||||
if (window == nullptr) {
|
||||
printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
|
||||
@ -141,15 +135,7 @@ int main(int, char **) {
|
||||
|
||||
// Main loop
|
||||
bool done = false;
|
||||
#ifdef __EMSCRIPTEN__
|
||||
// For an Emscripten build we are disabling file-system access, so let's not
|
||||
// attempt to do a fopen() of the imgui.ini file. You may manually call
|
||||
// LoadIniSettingsFromMemory() to load settings from your own storage.
|
||||
io.IniFilename = nullptr;
|
||||
EMSCRIPTEN_MAINLOOP_BEGIN
|
||||
#else
|
||||
while (!done)
|
||||
#endif
|
||||
{
|
||||
// Poll and handle events (inputs, window resize, etc.)
|
||||
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to
|
||||
@ -255,9 +241,6 @@ int main(int, char **) {
|
||||
|
||||
SDL_GL_SwapWindow(window);
|
||||
}
|
||||
#ifdef __EMSCRIPTEN__
|
||||
EMSCRIPTEN_MAINLOOP_END;
|
||||
#endif
|
||||
|
||||
// Cleanup
|
||||
ImGui_ImplOpenGL3_Shutdown();
|
||||
|
Reference in New Issue
Block a user