diff --git a/data/jids/frlen.jid b/data/jids/frlen.jid
index 6b259da85..b566f50cd 100644
--- a/data/jids/frlen.jid
+++ b/data/jids/frlen.jid
@@ -12,7 +12,7 @@
-
+
diff --git a/src/commands/cmd_about.c b/src/commands/cmd_about.c
index 3b571f846..58ceac829 100644
--- a/src/commands/cmd_about.c
+++ b/src/commands/cmd_about.c
@@ -108,9 +108,9 @@ static char *read_authors_txt(const char *filename)
int size;
FILE *f;
-#if (MAKE_VERSION(4, 2, 1) < MAKE_VERSION(ALLEGRO_VERSION, \
- ALLEGRO_SUB_VERSION, \
- ALLEGRO_WIP_VERSION))
+#if (MAKE_VERSION(4, 2, 1) >= MAKE_VERSION(ALLEGRO_VERSION, \
+ ALLEGRO_SUB_VERSION, \
+ ALLEGRO_WIP_VERSION))
size = file_size(dir->path);
#else
size = file_size_ex(dir->path);
diff --git a/src/core/config.c b/src/core/config.c
index 03104ab17..0e0194aef 100644
--- a/src/core/config.c
+++ b/src/core/config.c
@@ -456,9 +456,9 @@ static void load_config_file(CONFIG **config, AL_CONST char *filename, AL_CONST
return;
}
-#if (MAKE_VERSION(4, 2, 1) < MAKE_VERSION(ALLEGRO_VERSION, \
- ALLEGRO_SUB_VERSION, \
- ALLEGRO_WIP_VERSION))
+#if (MAKE_VERSION(4, 2, 1) >= MAKE_VERSION(ALLEGRO_VERSION, \
+ ALLEGRO_SUB_VERSION, \
+ ALLEGRO_WIP_VERSION))
length = file_size(filename);
#else
length = file_size_ex(filename);
diff --git a/src/file/gif/format.c b/src/file/gif/format.c
index a53c79fc2..965607552 100644
--- a/src/file/gif/format.c
+++ b/src/file/gif/format.c
@@ -392,9 +392,9 @@ gif_load_animation (const char *filename, void (*progress) (int))
{
PACKFILE *file;
GIF_ANIMATION *gif = NULL;
-#if (MAKE_VERSION(4, 2, 1) < MAKE_VERSION(ALLEGRO_VERSION, \
- ALLEGRO_SUB_VERSION, \
- ALLEGRO_WIP_VERSION))
+#if (MAKE_VERSION(4, 2, 1) >= MAKE_VERSION(ALLEGRO_VERSION, \
+ ALLEGRO_SUB_VERSION, \
+ ALLEGRO_WIP_VERSION))
int size = file_size(filename);
#else
int size = file_size_ex(filename);
diff --git a/src/modules/gui.c b/src/modules/gui.c
index 0218d81a2..c250bb384 100644
--- a/src/modules/gui.c
+++ b/src/modules/gui.c
@@ -61,13 +61,19 @@
/**************************************************************/
+#ifdef ALLEGRO_WINDOWS
+# define DEF_SCALE 2
+#else
+# define DEF_SCALE 1
+#endif
+
static struct {
int width;
int height;
int scale;
-} try_resolutions[] = { { 1024, 768, 2 },
- { 800, 600, 2 },
- { 640, 480, 2 },
+} try_resolutions[] = { { 1024, 768, DEF_SCALE },
+ { 800, 600, DEF_SCALE },
+ { 640, 480, DEF_SCALE },
{ 320, 240, 1 },
{ 320, 200, 1 },
{ 0, 0, 0 } };
diff --git a/src/raster/imgbit.c b/src/raster/imgbit.c
index 203639637..cf41c914e 100644
--- a/src/raster/imgbit.c
+++ b/src/raster/imgbit.c
@@ -263,7 +263,7 @@ static void bitmap_to_allegro(const Image *image, BITMAP *bmp, int _x, int _y)
color[0] = makecol8 (0, 0, 0);
color[1] = makecol8 (255, 255, 255);
-#ifdef GFX_MODEX
+#if defined GFX_MODEX && !defined ALLEGRO_UNIX
if (is_planar_bitmap (bmp)) {
for (y=0; yh; y++) {
address = LINES(image)[y];
@@ -294,7 +294,7 @@ static void bitmap_to_allegro(const Image *image, BITMAP *bmp, int _x, int _y)
_y++;
}
-#ifdef GFX_MODEX
+#if defined GFX_MODEX && !defined ALLEGRO_UNIX
}
#endif
break;
diff --git a/src/raster/imggray.c b/src/raster/imggray.c
index 13dc60351..a9943d5aa 100644
--- a/src/raster/imggray.c
+++ b/src/raster/imggray.c
@@ -216,7 +216,7 @@ static void grayscale_to_allegro(const Image *image, BITMAP *bmp, int _x, int _y
switch (depth) {
case 8:
-#ifdef GFX_MODEX
+#if defined GFX_MODEX && !defined ALLEGRO_UNIX
if (is_planar_bitmap(bmp)) {
for (y=0; yh; y++) {
bmp_address = (unsigned long)bmp->line[_y];
@@ -244,7 +244,7 @@ static void grayscale_to_allegro(const Image *image, BITMAP *bmp, int _x, int _y
_y++;
}
-#ifdef GFX_MODEX
+#if defined GFX_MODEX && !defined ALLEGRO_UNIX
}
#endif
break;
diff --git a/src/raster/imgindex.c b/src/raster/imgindex.c
index cc198ef2e..d7790269d 100644
--- a/src/raster/imgindex.c
+++ b/src/raster/imgindex.c
@@ -228,7 +228,7 @@ static void indexed_to_allegro(const Image *image, BITMAP *bmp, int _x, int _y)
switch (depth) {
case 8:
-#ifdef GFX_MODEX
+#if defined GFX_MODEX && !defined ALLEGRO_UNIX
if (is_planar_bitmap (bmp)) {
for (y=0; yh; y++) {
bmp_address = (unsigned long)bmp->line[_y];
@@ -255,7 +255,7 @@ static void indexed_to_allegro(const Image *image, BITMAP *bmp, int _x, int _y)
_y++;
}
-#ifdef GFX_MODEX
+#if defined GFX_MODEX && !defined ALLEGRO_UNIX
}
#endif
break;
diff --git a/src/raster/imgrgb.c b/src/raster/imgrgb.c
index f422ef320..8dc52dfc0 100644
--- a/src/raster/imgrgb.c
+++ b/src/raster/imgrgb.c
@@ -216,7 +216,7 @@ static void rgb_to_allegro (const Image *image, BITMAP *bmp, int _x, int _y)
switch (depth) {
case 8:
-#ifdef GFX_MODEX
+#if defined GFX_MODEX && !defined ALLEGRO_UNIX
if (is_planar_bitmap (bmp)) {
for (y=0; yh; y++) {
bmp_address = (unsigned long)bmp->line[_y];
@@ -249,7 +249,7 @@ static void rgb_to_allegro (const Image *image, BITMAP *bmp, int _x, int _y)
_y++;
}
-#ifdef GFX_MODEX
+#if defined GFX_MODEX && !defined ALLEGRO_UNIX
}
#endif
break;
diff --git a/src/util/col_file.c b/src/util/col_file.c
index 468a3f444..4c1c960f1 100644
--- a/src/util/col_file.c
+++ b/src/util/col_file.c
@@ -29,9 +29,9 @@
/* loads a COL file (Animator and Animator Pro format) */
RGB *load_col_file(const char *filename)
{
-#if (MAKE_VERSION(4, 2, 1) < MAKE_VERSION(ALLEGRO_VERSION, \
- ALLEGRO_SUB_VERSION, \
- ALLEGRO_WIP_VERSION))
+#if (MAKE_VERSION(4, 2, 1) >= MAKE_VERSION(ALLEGRO_VERSION, \
+ ALLEGRO_SUB_VERSION, \
+ ALLEGRO_WIP_VERSION))
int size = file_size(filename);
#else
int size = file_size_ex(filename);
diff --git a/src/util/msk_file.c b/src/util/msk_file.c
index 4ff367627..af7cc1ea0 100644
--- a/src/util/msk_file.c
+++ b/src/util/msk_file.c
@@ -31,9 +31,9 @@
/* loads a MSK file (Animator and Animator Pro format) */
Mask *load_msk_file(const char *filename)
{
-#if (MAKE_VERSION(4, 2, 1) < MAKE_VERSION(ALLEGRO_VERSION, \
- ALLEGRO_SUB_VERSION, \
- ALLEGRO_WIP_VERSION))
+#if (MAKE_VERSION(4, 2, 1) >= MAKE_VERSION(ALLEGRO_VERSION, \
+ ALLEGRO_SUB_VERSION, \
+ ALLEGRO_WIP_VERSION))
int orig_size = file_size(filename);
#else
int orig_size = file_size_ex(filename);
diff --git a/src/widgets/editor/editor.c b/src/widgets/editor/editor.c
index f1bef5851..14b17eb5a 100644
--- a/src/widgets/editor/editor.c
+++ b/src/widgets/editor/editor.c
@@ -400,6 +400,8 @@ void editor_draw_sprite(JWidget widget, int x1, int y1, int x2, int y2)
destroy_bitmap(bmp);
#else
+ acquire_bitmap(ji_screen);
+
use_current_sprite_rgb_map();
if (bitmap_color_depth(screen) == 8) {
image_to_allegro(rendered, ji_screen, dest_x, dest_y);
@@ -412,6 +414,8 @@ void editor_draw_sprite(JWidget widget, int x1, int y1, int x2, int y2)
}
restore_rgb_map();
+ release_bitmap(ji_screen);
+
image_free(rendered);
#endif
}