mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
Load a better palette by default
This commit is contained in:
parent
5ba85c01dc
commit
bc3d3e9413
@ -45,6 +45,7 @@
|
|||||||
#include "app/modules/gui.h"
|
#include "app/modules/gui.h"
|
||||||
#include "app/modules/palettes.h"
|
#include "app/modules/palettes.h"
|
||||||
#include "app/recent_files.h"
|
#include "app/recent_files.h"
|
||||||
|
#include "app/resource_finder.h"
|
||||||
#include "app/shell.h"
|
#include "app/shell.h"
|
||||||
#include "app/tools/tool_box.h"
|
#include "app/tools/tool_box.h"
|
||||||
#include "app/ui/color_bar.h"
|
#include "app/ui/color_bar.h"
|
||||||
@ -77,6 +78,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef ALLEGRO_WINDOWS
|
#ifdef ALLEGRO_WINDOWS
|
||||||
#include <winalleg.h>
|
#include <winalleg.h>
|
||||||
#endif
|
#endif
|
||||||
@ -147,6 +149,14 @@ App::App(int argc, const char* argv[])
|
|||||||
options.paletteFileName():
|
options.paletteFileName():
|
||||||
base::string(get_config_string("GfxMode", "Palette", "")));
|
base::string(get_config_string("GfxMode", "Palette", "")));
|
||||||
|
|
||||||
|
if (palFile.empty()) {
|
||||||
|
// Try to use a default pixel art palette.
|
||||||
|
ResourceFinder rf;
|
||||||
|
rf.includeDataDir("palettes/db32.gpl");
|
||||||
|
if (rf.findFirst())
|
||||||
|
palFile = rf.filename();
|
||||||
|
}
|
||||||
|
|
||||||
if (!palFile.empty()) {
|
if (!palFile.empty()) {
|
||||||
PRINTF("Loading custom palette file: %s\n", palFile.c_str());
|
PRINTF("Loading custom palette file: %s\n", palFile.c_str());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user