diff --git a/check_targets.jai b/check_targets.jai index 6b69011..5dfb22a 100644 --- a/check_targets.jai +++ b/check_targets.jai @@ -29,7 +29,7 @@ APP_NAME :: "mcap"; APP_FOLDER_NAME :: "mcap"; GIT_BRANCH :: "check"; GIT_HASH :: "-"; -VERSION :: "0.1.10"; +VERSION :: "0.1.11"; BUILD_DATE :: "-"; DEBUG :: true; COMPILE_TESTS :: true; diff --git a/first.jai b/first.jai index 45b2e6f..7e569e0 100644 --- a/first.jai +++ b/first.jai @@ -8,7 +8,7 @@ APP_NAME :: "mcap"; APP_FOLDER_NAME :: "mcap"; APP_BUNDLE_IDENTIFIER :: "com.example.mcap"; -VERSION :: "0.1.10"; +VERSION :: "0.1.11"; // Where everything goes: bin/, or bin-headless/ for builds made with no_crash_dialog, so automated // builds never write over the ones you run by hand. build_directory := "bin"; diff --git a/src/App.jai b/src/App.jai index e7f8bc7..49c2801 100644 --- a/src/App.jai +++ b/src/App.jai @@ -201,7 +201,7 @@ App :: struct { start_search: string; // -search QUERY: the search box's text at startup erase_and_exit: string; // -erase ocr|labels|segments|all: erase that from the whole library once it has loaded, then exit record_and_exit: float64; // -record SECONDS: record the screen under the cursor that long, put it in the library, then exit (0, or 1 if it failed) - record_region: RECT; // -record-region X Y W H: -record records that, on the virtual desktop, not the whole screen + #if OS == .WINDOWS record_region: RECT; // -record-region X Y W H: -record records that, on the virtual desktop, not the whole screen segment_and_exit: bool; // -segment: segment the library folders set to segment once the catalog has loaded, then exit (0, or 1 if any image failed) import_source, import_dest: string; // -import SOURCE DEST: import SOURCE into the library folder DEST (app/import.jai), then exit last_window_restore_time: Apollo_Time; diff --git a/src/app/main.jai b/src/app/main.jai index 041c8d2..dd5c04d 100644 --- a/src/app/main.jai +++ b/src/app/main.jai @@ -26,7 +26,7 @@ main :: () { app.scan_and_exit = array_find(app.args, "-scan"); app.segment_and_exit = array_find(app.args, "-segment"); for app.args if it == "-record" && it_index + 1 < app.args.count app.record_and_exit = max(string_to_float64(app.args[it_index + 1]), 1.0); - for app.args if it == "-record-region" && it_index + 4 < app.args.count { + #if OS == .WINDOWS for app.args if it == "-record-region" && it_index + 4 < app.args.count { x, y := cast(s32) string_to_int(app.args[it_index + 1]), cast(s32) string_to_int(app.args[it_index + 2]); app.record_region = .{x, y, x + cast(s32) string_to_int(app.args[it_index + 3]), y + cast(s32) string_to_int(app.args[it_index + 4])}; } diff --git a/src/backends/unix_sdl3_gpu3.jai b/src/backends/unix_sdl3_gpu3.jai index e9c2400..72c0c26 100644 --- a/src/backends/unix_sdl3_gpu3.jai +++ b/src/backends/unix_sdl3_gpu3.jai @@ -4,7 +4,9 @@ // jai generate.jai - -backend_sdl3_gpu3 // -using ImGui; +// Not ImGui.Image: the app has its own Image (modules/Image_Decode), and this file is #load-ed into +// the app's scope. Keep the except when generating this file again. +using,except(Image) ImGui; // Follow "Getting Started" link and check examples/ folder to learn about using backends! ImplSDL3_InitForOpenGL :: (window: *SDL_Window, sdl_gl_context: *void) -> bool #foreign imgui_sdl3_gpu3 "_Z28ImGui_ImplSDL3_InitForOpenGLP10SDL_WindowPv";