Commit Graph

102 Commits

Author SHA1 Message Date
David Capello
27b55030e2 Fix bug pressing warning icon to add palette color when active locale is non-English
It looks like Allegro library was changing the locale to the active
one, and it can break things like strtod() (which is used to convert
colors from string format in AddColor command). In this case, if we added
a HSV color with double floating-point precision, it was added incorrectly
because strtod() wasn't taking the decimal part.
2016-03-28 15:30:00 -03:00
David Capello
fb4fc576bc Fix clicks on X11 (fix #971) 2016-02-29 22:13:23 -03:00
David Capello
3400cdba8b Hide software cursor when mouse leaves window on Linux (fix #948)
Now we generate MouseEvent/Leave she events when Allegro4 _mouse_on
changes from 1 to 0 or vice-versa on Linux.
2016-02-12 18:59:11 -03:00
David Capello
7b8b2dae53 Remove mouse speed modifications from Allegro4/X11 port
This might be related to #957
2016-02-12 18:56:15 -03:00
David Capello
f47ba09984 Fix mouse lag on Linux with hi-res devices (fix #283) 2015-11-30 15:30:25 -03:00
ripesunflower
d96c7bff45 Move var to beginnig of scope
I get error without it in VS2013
2015-11-04 09:55:10 +03:00
David Capello
05249dc191 Fix crash closing the window when it's on fullscreen mode on OS X 2015-11-03 16:14:05 -03:00
David Capello
8c781ecd57 Fix crashes switching between fullscreen/windowed mode on OS X 2015-11-03 16:13:45 -03:00
David Capello
caf8388ac6 Fix crash resizing the window when we restart the app on OS X and it was closed on fullscreen size 2015-10-19 11:32:33 -03:00
David Capello
6e15553c88 Fix crash when window title is changed on OS X and fullscreen is enabled (fix #833) 2015-10-19 09:26:29 -03:00
David Capello
a824fcb5e1 Fix crash on Windows if gfx_directx_acknowledge_resize() fails 2015-09-29 13:58:12 -03:00
David Capello
4ebefd3f13 Fix problem getting pixels in non-32bpp Allegro BITMAPs
Regression introduced in 5e3ba8237a
This changed was needed to load certain .png fonts correctly in the
SkinTheme.
2015-09-25 08:32:50 -03:00
David Capello
adce0b9569 Fix invalid key[] access in _handle_key_press()
On Windows, if we pressed numpad dot key, all timers start working
incorrectly (e.g. animations couldn't be reproduced anymore.).
There was one report about this same issue on Mac OS X.
2015-09-11 15:12:21 -03:00
David Capello
434059d517 Don't access to the first item in DirectDraw surfaces list outside the gfx critical region
This could be a fix for a long-standing crash in
gfx_directx_restore_surface() accesing to an invalid
memory address.
2015-08-24 12:48:27 -03:00
David Capello
32b12d17da Fix visual artifacts on Windows when the window is resized
Now when the user resizes the OS window (a she::Display), it generates
a kDisplayResize she::Event, and this is processed by the UI layer to
redraw the entire ui::Manager.

With this change we remove the obscure "bool" return value in
she::Display::flip() member function.
2015-07-30 16:15:21 -03:00
David Capello
65105f33da Do not link with QuickTime and audio frameworks on OS X 2015-06-01 14:39:30 -03:00
David Capello
744fc67b28 Implement native open/save dialog on OS X (issue #321)
There were some problems detecting the release of Cmd+O keys after
opening a NSSavePanel. We fixed those problems calling
osx_keyboard_focused/modifiers(0) when we receive a windowDidResignKey
notification.
2015-05-28 16:29:01 -03:00
David Capello
e09cdd67cb Add support to compile with VS2013 x64 2015-03-06 17:01:08 -03:00
David Capello
15b0b86339 Remove extra token after #endif 2015-03-04 19:26:35 -03:00
David Capello
35be72833b Don't redefine ASSERT/TRACE in allegro/debug.h 2015-02-14 22:09:07 -03:00
David Capello
f5a49ad0df OSX: Fix image used to start animation before minimize 2015-01-26 10:29:00 -03:00
David Capello
6c3b4ba805 OSX: Fix infinite loop in waiting for lockFocusIfCanDraw=YES
There are some bug report about problems when the window is minimized.
I was able to reproduce this bug minimizing the window, hiding the dock
(using the system settings), showing the dock again, and trying to
restore the window.
2015-01-26 10:27:36 -03:00
David Capello
3745f563d0 Fix more problems with OS X mouse cursor
Don’t hide native cursor or show custom cursor if the mouse is outside
the main view.
2015-01-26 09:31:10 -03:00
David Capello
eff46d4134 Add infinite editor scroll to OS X
Fix osx_mouse_position()
2015-01-25 19:09:30 -03:00
David Capello
429c722f73 Fix OS X mouse position issues
Fix problems using absolute mouse positions in the view when the mouse
were outside the view area.
2015-01-25 19:08:41 -03:00
David Capello
7a4f4c9c5e Support running multiple instances on OS X (fix #533) 2014-11-30 21:00:27 -03:00
David Capello
2de3f7caff Fix crash when other app prevent us to recreate the primary DirectDraw surface (fix #542) 2014-11-24 20:24:28 -03:00
David Capello
51061894de Fix more OS X cursor issues
Fixed problems with a hidden mouse cursor when we activated Aseprite
window from other windows, or from the Mission Control, or with Cmd+Alt.
2014-11-05 11:14:49 -03:00
David Capello
13fc8e03d2 Fix #392 - Crash when another monitor is plugged in
When we change the number of monitors, we've to restore the primary
DirectDraw surface, but it cannot be just "restored", it must be
re-created.

Note: probably the real fix for #436 too
2014-11-02 18:59:00 -03:00
David Capello
b9b3b02882 Fix mouse issues on OS X (fix #458)
Now we generate she::Event::MouseEnter/Leave events correctly when the
mouse leaves or enters into the window to show the native cursor again
when necessary.

Close #466
2014-11-01 11:36:51 -03:00
David Capello
ee685e419e Win32: Don't process extra mouse buttons messages (related to issue #483) 2014-09-11 00:02:33 -03:00
David Capello
a2107f5bd9 Mac OS X: Avoid Cocoa error beep when a Cmd+key is used
This change should be reverted in some way when the OS X menus
are implemented (issue #135)
2014-08-28 09:50:32 -03:00
David Capello
33d7b305a2 Several changes related to the location of resources
- Add ResourceFinder::includeUserDir() (used by aseprite.ini, crash dump,
  and aseprite.log). These locations depend on App::isPortable() (if the
  app is portable or installed).
- We don't need to change the current directory in
  applicationDidFinishLaunching anymore (ResourceFinder::includeDataDir()
  takes care about bundles now in a correct way).
- Migrate old ~/.asepriterc to ~/.config/aseprite/aseprite.ini
2014-08-24 09:00:35 -03:00
David Capello
8594d7515f Remove application:openFile: declaration for AllegroAppDelegate 2014-08-23 20:40:59 -03:00
David Capello
ab71f13073 Minor changes in qzwindow.m 2014-08-23 14:17:37 -03:00
David Capello
354d945b49 Fix initial crash on Mac OS X version when there isn't .asepriterc file and our desktop resolution is 1024x768
Now, a set_gfx_mode() (in Mac OS X) can accept almost any resolution,
the screen will be created with the NSView bounds anyway (which can be
smaller than the given size in set_gfx_mode()).
2014-08-23 14:17:13 -03:00
David Capello
9135461627 Fix #455 - fix command line processing when the app is in a bundle 2014-08-22 09:36:40 -03:00
David Capello
08d1593481 Avoid warning for unused var in app.mm 2014-08-21 22:06:37 -03:00
David Capello
9398bbc000 Mac OS X: Add support to open files with double-click from Finder 2014-08-18 23:07:53 -03:00
David Capello
155b770acd Avoid crash by ASSERT()
I think this ASSERT crashes the program because they aren't called from
the main thread, but I'm not quite sure.
2014-08-12 08:22:43 -03:00
David Capello
1c324c9b14 Add experimental option to use native mouse cursors (and some renames of cursor names) 2014-08-10 19:51:14 -03:00
David Capello
8cf25c49a7 Win32: Fix bug where the mouse capture isn't released 2014-08-10 00:12:33 -03:00
David Capello
d3aa22ac12 Mac OS X: Hide native mouse cursor (related to issue 350) 2014-06-29 16:10:12 -03:00
David Capello
15a3b6ac2c Fix double-click issues
- Fix double-click behavior when double-clicks are generated from
  Manager::generateMouseMessages().
- Add Widget::setDoubleClickeable/isDoubleClickeable() member functions
  for widgets that accept double-clicks.
2014-04-26 11:09:59 -03:00
David Capello
47ee01c1a0 Proper handling of HRESULTs 2014-04-20 17:41:49 -03:00
David Capello
f0802ed766 Trace unknown scancodes in allegro/src/keyboard.c 2014-03-16 19:24:49 -03:00
David Capello
15f55c045c wddlock.c: Don't use _al_wd_dirty_lines if it's null
Related to issue 359: Program exits unexpectently after minimizing
and maximizing too fast.

I should find the cause of _al_wd_dirty_lines = NULL, but I wasn't able
to reproduce this bug, so at the moment this is the best I can do to avoid
a crash. (I suppose that it's related to a temporary invalid state because
thread sync issues when the screen/window changes its size.)
2014-03-08 21:34:48 -03:00
David Capello
fc58c24da2 allegro/src/keyboard.c: Avoid accessing out of range items in key/_key arrays 2013-12-29 19:52:21 -03:00
David Capello
c3e583f927 Fix some compilations problems in MinGW
Anyway without DirectX header files (ddraw.h specifically) we cannot
compile Allegro source code with MinGW.
2013-12-22 12:20:53 -03:00
David Capello
8678e3b21b Mac OS X fix: ALLEGRO_HAVE_STDINT_H is already defined in alplatf.h 2013-11-25 10:44:20 -03:00