Skip to content

Commit

Permalink
make it work on macos and some small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
uvwxy committed Nov 24, 2021
1 parent 5d8b7fa commit 17d335c
Showing 4 changed files with 7 additions and 26 deletions.
1 change: 1 addition & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@ max/
.*
!/.gitignore

build/
3 changes: 3 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -14,6 +14,9 @@ add_compile_definitions(FAKE_ARDUINO)
file(GLOB OSWLIB_SRC_FILES ../*.cpp)
add_library(oswLibrary STATIC ${OSWLIB_SRC_FILES})
include_directories(oswLibrary ${SDL2_INCLUDE_DIRS} ${SDL2IMAGE_INCLUDE_DIRS})
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
link_directories(/usr/local/lib)
endif()
target_link_libraries(oswLibrary PRIVATE ${SDL2_LIBRARY} ${SDL2IMAGE_LIBRARIES})

# examples
7 changes: 3 additions & 4 deletions examples/text/main.cpp
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@

#include "../../FakeArduino.h"
#include "../../FakeArduinoWindowSDL.h"
#include "../../SDL2/SDL.h"
#include "../../anim_water_ripple.h"
#include "../../gfx_2d_print.h"
#include "../../gfx_util.h"
@@ -76,7 +75,7 @@ class RotationExampleWindow : public SDLWindowRGB565 {
gfx->setTextSize(1);
gfx->print("Font Serif Bold 9px");
gfx->clearFont();


/*
gfx->fill(rgb565(0, 0, 0));
@@ -86,12 +85,12 @@ class RotationExampleWindow : public SDLWindowRGB565 {
gfx->setTextSize(1);
for(i=0; i<11; i++){
for(j=0;j<17;j++){
gfx->setTextCursor(j*15+10,i*15+10);
gfx->setTextCursor(j*15+10,i*15+10);
gfx->print(char(i*10+j+160));
}
}
*/

}
};

22 changes: 0 additions & 22 deletions examples/watch-simple/CMakeLists.txt

This file was deleted.

0 comments on commit 17d335c

Please sign in to comment.