Skip to content

Commit

Permalink
Merge branch 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisboyle committed Jan 17, 2023
2 parents 56099b1 + 80f64cf commit 6d39d14
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
7 changes: 5 additions & 2 deletions app/src/main/jni/cmake/setup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,16 @@ endfunction()
function(write_generated_games_header)
set(generated_include_dir ${CMAKE_CURRENT_BINARY_DIR}/include)
set(generated_include_dir ${generated_include_dir} PARENT_SCOPE)
set(header_pre ${generated_include_dir}/generated-games.h.pre)
set(header ${generated_include_dir}/generated-games.h)

file(MAKE_DIRECTORY ${generated_include_dir})
file(WRITE ${generated_include_dir}/generated-games.h "")
file(WRITE ${header_pre} "")
list(SORT puzzle_names)
foreach(name ${puzzle_names})
file(APPEND ${generated_include_dir}/generated-games.h "GAME(${name})\n")
file(APPEND ${header_pre} "GAME(${name})\n")
endforeach()
configure_file(${header_pre} ${header} COPYONLY)
endfunction()

# This has to be run from the unfinished subdirectory, so that the
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/jni/midend.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,13 @@ static int convert_tilesize(midend *me, int old_tilesize,
double old_dpr, double new_dpr)
{
int x, y, rx, ry, min, max;
game_params *defaults = me->ourgame->default_params();
game_params *defaults;

if (new_dpr == old_dpr)
return old_tilesize;

defaults = me->ourgame->default_params();

me->ourgame->compute_size(defaults, old_tilesize, &x, &y);
x *= new_dpr / old_dpr;
y *= new_dpr / old_dpr;
Expand Down
2 changes: 1 addition & 1 deletion not-in-use/fuzzpuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int main(int argc, char **argv)
ourgame = gamelist[i];
sfree(gamename);
if (ourgame == NULL) {
fprintf(stderr, "Game '%s' not recognised\n", gamename);
fprintf(stderr, "Game not recognised\n");
ret = 1;
continue;
}
Expand Down
14 changes: 7 additions & 7 deletions not-in-use/fuzzpuzz.dict
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ interesting_16="1024"
interesting_16="4096"
interesting_16="32767"
interesting_32="-2147483648"
interesting_32"-100663046"
interesting_32"-32769"
interesting_32"32768"
interesting_32"65535"
interesting_32"65536"
interesting_32"100663045"
interesting_32"2147483647"
interesting_32="-100663046"
interesting_32="-32769"
interesting_32="32768"
interesting_32="65535"
interesting_32="65536"
interesting_32="100663045"
interesting_32="2147483647"

0 comments on commit 6d39d14

Please sign in to comment.