2.5.1
This commit is contained in:
parent
018e506c80
commit
85e04fbcc6
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
**2.5.1**
|
||||
* Allow Overriidng Custom Skin Server Using ``MCPI_SKIN_SERVER`` Environmental Variable
|
||||
* Fix Bug With SDK Generation
|
||||
|
||||
**2.5.0**
|
||||
* [Custom skin support](CUSTOM_SKINS.md)!
|
||||
* Add ``Load Custom Skins`` Feature Flag (Enabled By Default)
|
||||
|
BIN
images/start.png
BIN
images/start.png
Binary file not shown.
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 164 KiB |
@ -11,7 +11,18 @@ target_include_directories(
|
||||
# SDK
|
||||
if(BUILD_ARM_COMPONENTS)
|
||||
install(TARGETS media-layer-headers EXPORT sdk DESTINATION "${MCPI_SDK_LIB_DIR}")
|
||||
install(DIRECTORY "include/" DESTINATION "${MCPI_SDK_INCLUDE_DIR}/media-layer")
|
||||
# Copy Headers
|
||||
set(GLES_HEADERS "include/GLES")
|
||||
install(
|
||||
DIRECTORY "include/"
|
||||
DESTINATION "${MCPI_SDK_INCLUDE_DIR}/media-layer"
|
||||
PATTERN "${GLES_HEADERS}" EXCLUDE
|
||||
)
|
||||
file(REAL_PATH "${GLES_HEADERS}" GLES_HEADERS)
|
||||
install(
|
||||
DIRECTORY "${GLES_HEADERS}/"
|
||||
DESTINATION "${MCPI_SDK_INCLUDE_DIR}/media-layer/GLES"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Add Extras
|
||||
|
@ -45,7 +45,7 @@ static int32_t OptionsScreen_handleBackEvent_injection(unsigned char *screen, bo
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Fix "Sleeping Beaty" Bug
|
||||
// Fix "Sleeping Beauty" Bug
|
||||
static int32_t InBedScreen_handleBackEvent_injection(unsigned char *screen, bool do_nothing) {
|
||||
if (!do_nothing) {
|
||||
// Close Screen
|
||||
|
@ -38,7 +38,7 @@ static void load_servers() {
|
||||
// Write Defaults
|
||||
std::ofstream server_list_file_output(file);
|
||||
server_list_file_output << "# External Servers File\n";
|
||||
server_list_file_output << "thebrokenrail.com\n";
|
||||
server_list_file_output << "# Example: thebrokenrail.com\n";
|
||||
server_list_file_output.close();
|
||||
// Re-Open Stream
|
||||
server_list_file = std::ifstream(file);
|
||||
|
@ -95,6 +95,16 @@ static void load_pending_skins(__attribute__((unused)) unsigned char *minecraft)
|
||||
pthread_mutex_unlock(&pending_skins_lock);
|
||||
}
|
||||
|
||||
// Skin Server
|
||||
static std::string get_skin_server() {
|
||||
const char *custom_server = getenv("MCPI_SKIN_SERVER");
|
||||
if (custom_server != NULL) {
|
||||
return custom_server;
|
||||
} else {
|
||||
return MCPI_SKIN_SERVER;
|
||||
}
|
||||
}
|
||||
|
||||
// Skin Loader
|
||||
struct loader_data {
|
||||
int32_t texture_id;
|
||||
@ -105,7 +115,7 @@ static void *loader_thread(void *user_data) {
|
||||
loader_data *data = (loader_data *) user_data;
|
||||
|
||||
// Download
|
||||
std::string url = std::string(MCPI_SKIN_SERVER) + '/' + data->name + ".png";
|
||||
std::string url = get_skin_server() + '/' + data->name + ".png";
|
||||
int return_code;
|
||||
const char *command[] = {"wget", "-O", "-", url.c_str(), NULL};
|
||||
char *output = run_command(command, &return_code);
|
||||
@ -159,4 +169,6 @@ void _init_skin_loader() {
|
||||
overwrite_calls((void *) Textures_assignTexture, (void *) Textures_assignTexture_injection);
|
||||
// Pending Skins
|
||||
misc_run_on_tick(load_pending_skins);
|
||||
// Log
|
||||
DEBUG("Skin Server: %s", get_skin_server().c_str());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user