[0.1.11] macOS and Linux build again: ImGui's Image kept out of the app's scope; a Windows-only field guarded
- src/backends/unix_sdl3_gpu3.jai (macOS and Linux) brought all of ImGui into the app's scope, where ImGui.Image collided with modules/Image_Decode's Image struct: both builds have failed since 0.0.8 brought in Image_Decode. It now uses ImGui except Image, with a note to keep that when the file is generated again. - app.record_region (-record-region) was a Windows RECT in the shared App struct, from 0.1.6; it and its parsing are Windows only now. - jai check_targets.jai - linux passes. The macOS check needs a Mac: macOS shares the same backend file and App struct, so both breaks applied there too.
This commit is contained in:
parent
4acde4d7a6
commit
693974bedd
@ -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;
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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])};
|
||||
}
|
||||
|
||||
@ -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";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user