mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Fix problems with Allegro + MacOSX + main().
Renamed the application main to app_main() so it's called from "she" library. It's impossible to avoid dirty main() tricks with Allegro 4.
This commit is contained in:
parent
ae777018e2
commit
d46616e71f
@ -16,7 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "tests/test.h"
|
||||
|
||||
#include "app/color.h"
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, const Color& color) {
|
||||
@ -50,9 +51,3 @@ TEST(Color, toString)
|
||||
EXPECT_EQ("rgb{32,16,255}", Color::fromRgb(32, 16, 255).toString());
|
||||
EXPECT_EQ("hsv{32,64,99}", Color::fromHsv(32, 64, 99).toString());
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -16,9 +16,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "tests/test.h"
|
||||
|
||||
#include "app.h"
|
||||
#include "document.h"
|
||||
|
@ -71,8 +71,8 @@ static bool get_memory_dump_filename(std::string& filename)
|
||||
#endif
|
||||
}
|
||||
|
||||
// ASEPRITE entry point
|
||||
int main(int argc, char* argv[])
|
||||
// ASEPRITE entry point. (Called from she library.)
|
||||
int app_main(int argc, char* argv[])
|
||||
{
|
||||
// Initialize the random seed.
|
||||
std::srand(static_cast<unsigned int>(std::time(NULL)));
|
||||
|
@ -310,12 +310,11 @@ System* Instance()
|
||||
|
||||
}
|
||||
|
||||
#ifdef main
|
||||
// It must be defined by the user program code.
|
||||
extern int app_main(int argc, char* argv[]);
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
#undef main
|
||||
extern int main(int argc, char* argv[]);
|
||||
return main(argc, argv);
|
||||
return app_main(argc, argv);
|
||||
}
|
||||
|
||||
END_OF_MAIN();
|
||||
#endif
|
||||
|
@ -28,11 +28,7 @@
|
||||
#include "ui/gui.h"
|
||||
#endif
|
||||
|
||||
#ifdef main
|
||||
#undef main
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
int app_main(int argc, char* argv[])
|
||||
{
|
||||
int exitcode;
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
Loading…
x
Reference in New Issue
Block a user