Skip to content

Commit

Permalink
test pine phone
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyrog committed Jan 4, 2021
1 parent 58da995 commit 0124c55
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
{erl_opts, [debug_info, nowarn_export_all, fail_on_warning]}.

{deps, [
{epx, ".*", {git, "https://github.com/tonyrog/epx.git"}}
% {epx, ".*", {git, "https://github.com/tonyrog/epx.git"}}
]}.
17 changes: 16 additions & 1 deletion src/pacman.erl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
-export([run_game/1]).

-export([start_rpi/0]).
-export([start_pine/0]).
-export([start_link_embedded_fb/0]).
-export([start_link_embedded_x11/0]).

Expand Down Expand Up @@ -192,14 +193,28 @@ start_rpi() ->
ok = application:load(epx),
application:set_env(epx, backend, "fb"),
application:set_env(epx, pixel_format, 'argb/little'),
application:start(epx),
application:ensure_all_started(epx),
W = epx:window_create(0,0,800,480,[key_press,key_release]),
P = epx:pixmap_create(800, 480, 'argb/little'),
Backend = epx_backend:default(),
epx:window_attach(W, Backend),
epx:pixmap_attach(P, Backend),
run_game1(W, P).

%% start on pine with 7 inch touch (720x1440)
start_pine() ->
ok = application:load(epx),
application:set_env(epx, backend, "fb"),
application:set_env(epx, pixel_format, 'argb/little'),
application:ensure_all_started(epx),
application:start(epx),
W = epx:window_create(0,0,720,1440,[key_press,key_release]),
P = epx:pixmap_create(720,1440, 'argb/little'),
Backend = epx_backend:default(),
epx:window_attach(W, Backend),
epx:pixmap_attach(P, Backend),
run_game1(W, P).

run_game1(W, P) ->
game_loop(init1(W, P)).

Expand Down

0 comments on commit 0124c55

Please sign in to comment.