Remove stb_image usage (no longer used for anything).

This commit is contained in:
Sacha 2013-12-08 02:37:06 +10:00
parent 6ea758db67
commit 21ae157f66
4 changed files with 12 additions and 20 deletions

View file

@ -325,11 +325,6 @@ add_library(rg_etc1 STATIC
native/ext/rg_etc1/rg_etc1.h)
include_directories(native/ext/rg_etc1)
add_library(stb_image STATIC
native/ext/stb_image/stb_image.c
native/ext/stb_image/stb_image.h)
include_directories(native/ext/stb_image)
add_library(stb_vorbis STATIC
native/ext/stb_vorbis/stb_vorbis.c
native/ext/stb_vorbis/stb_vorbis.h)
@ -814,7 +809,7 @@ add_library(native STATIC
native/ext/jpge/jpge.cpp
native/ext/jpge/jpge.h)
include_directories(native)
target_link_libraries(native ${LIBZIP_LIBRARY} ${LIBPNG_LIBRARY} rg_etc1 vjson stb_image stb_vorbis snappy ${GLEW_LIBRARIES})
target_link_libraries(native ${LIBZIP_LIBRARY} ${LIBPNG_LIBRARY} rg_etc1 vjson stb_vorbis snappy ${GLEW_LIBRARIES})
if(ANDROID)
target_link_libraries(native log)

View file

@ -28,17 +28,6 @@ SOURCES += $$P/native/ext/jpge/*.cpp
HEADERS += $$P/native/ext/jpge/*.h
INCLUDEPATH += $$P/native/ext/jpge
# Stb_image
SOURCES += $$P/native/ext/stb_image/stb_image.c
HEADERS += $$P/native/ext/stb_image/stb_image.h
INCLUDEPATH += $$P/native/ext/stb_image
win32 {
SOURCES += $$P/native/ext/stb_image_write/stb_image_write.c
HEADERS += $$P/native/ext/stb_image_write/stb_image_writer.h
INCLUDEPATH += $$P/native/ext/stb_image_write
}
# Stb_vorbis
SOURCES += $$P/native/ext/stb_vorbis/stb_vorbis.c

View file

@ -28,13 +28,13 @@
// in NativeShutdown.
#include <locale.h>
#include <png.h>
#include "base/logging.h"
#include "base/mutex.h"
#include "base/NativeApp.h"
#include "file/vfs.h"
#include "file/zip_read.h"
#include "ext/stb_image_write/stb_image_writer.h"
#include "ext/jpge/jpge.h"
#include "thread/thread.h"
#include "net/http_client.h"
@ -532,7 +532,15 @@ void TakeScreenshot() {
}
if (g_Config.bScreenshotsAsPNG) {
stbi_write_png(temp, pixel_xres, pixel_yres, 4, flipbuffer, pixel_xres * 4);
png_image png;
memset(&png, 0, sizeof(png));
png.version = PNG_IMAGE_VERSION;
png.format = PNG_FORMAT_RGB;
png.width = pixel_xres;
png.height = pixel_yres;
int stride = PNG_IMAGE_ROW_STRIDE(png);
png_image_write_to_file(&png, temp, 0, flipbuffer, pixel_xres * 4, NULL);
png_image_free(&png);
} else {
jpge::params params;
params.m_quality = 90;

2
native

@ -1 +1 @@
Subproject commit 64b5146718c768818c6819057d00712acf31631e
Subproject commit d0023bbdd978cf34a9ff5d812b1c09c9e62d5e99