Skip to content

Commit

Permalink
update settings.cpp
Browse files Browse the repository at this point in the history
fixed indent
  • Loading branch information
TheLastMillennial committed Oct 21, 2022
1 parent 8b515c4 commit bc6dda6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 62 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -62,3 +62,4 @@ gui/qt/capture/libpng*

# more build stuff
gui/qt/CEmu.build/
gui/qt/CEmu.pro
66 changes: 5 additions & 61 deletions gui/qt/CEmu.pro
Expand Up @@ -65,7 +65,7 @@ DEFINES += DEBUG_SUPPORT

# These options can be disabled / enabled depending on
# compiler / library support for your toolchain
DEFINES += LIB_ARCHIVE_SUPPORT PNG_SUPPORT GLOB_SUPPORT
DEFINES += GLOB_SUPPORT

CONFIG(release, debug|release) {
#This is a release build
Expand All @@ -91,26 +91,7 @@ if (!win32-msvc*) {
PKGCONFIG += zlib libarchive
}
# You should run ./capture/get_libpng-apng.sh first!
isEmpty(USE_LIBPNG) {
exists("$$PWD/capture/libpng-apng/.libs/libpng16.a") {
message("Built libpng-apng detected, using it")
USE_LIBPNG = internal
} else {
packagesExist(libpng) {
USE_LIBPNG = system
} else {
error("You have to run $$PWD/capture/get_libpng-apng.sh first, or at least get libpng-dev(el)!")
}
}
}
equals(USE_LIBPNG, "system") {
message("Warning: unless your system libpng has APNG support, you will not be able to record screen captures!")
PKGCONFIG += libpng
} else {
!exists("$$PWD/capture/libpng-apng/.libs/libpng16.a"): error("You have to run $$PWD/capture/get_libpng-apng.sh first!")
INCLUDEPATH += $$PWD/capture/libpng-apng
LIBS += $$PWD/capture/libpng-apng/.libs/libpng16.a
}

} else {
# TODO: add equivalent flags
# Example for -Werror=shadow: /weC4456 /weC4457 /weC4458 /weC4459
Expand All @@ -123,44 +104,7 @@ if (!win32-msvc*) {
# Add -MP to enable speedier builds
QMAKE_CXXFLAGS += /MP

# Do we have a flag specifying use of libpng-apng from vcpkg?
equals(LIBPNG_APNG_FROM_VCPKG, 1) {
warning("Enabled using libpng-apng from vcpkg. Note that if you do not have vcpkg integrated into MSVC, and/or do not have libpng-apng installed within vcpkg, the build will likely fail.")
# This is a bad hack, but MOC kinda needs it to work correctly...
QMAKE_MOC_OPTIONS += -DPNG_WRITE_APNG_SUPPORTED
}

# Otherwise...
!equals(LIBPNG_APNG_FROM_VCPKG, 1) {
# If we're not using vcpkg, we rely on manual variables to find needed
# libpng-apng components.
#
# Note that libpng/zlib LIBS/INCLUDES should be specified in the envrionment.
# We will use LIBPNG_APNG_LIB, ZLIB_LIB, and LIBPNG_APNG_INCLUDE.
# The logic below accounts for both specifying in the real shell environment,
# as well as directly on the command line (e.g. qmake VAR=1).
isEmpty(LIBPNG_APNG_LIB) {
LIBPNG_APNG_LIB = $$(LIBPNG_APNG_LIB)
isEmpty(LIBPNG_APNG_LIB) {
error("For MSVC builds, we require LIBPNG_APNG_LIB to point to the libpng-apng lib file to compile against. Please set this in your environment and try again. Alternatively, set LIBPNG_APNG_FROM_VCPKG=1 if you use vcpkg and installed libpng-apng in it.")
}
}
isEmpty(ZLIB_LIB) {
ZLIB_LIB = $$(ZLIB_LIB)
isEmpty(ZLIB_LIB) {
error("For MSVC builds, we require ZLIB_LIB to point to the zlib lib file to compile against. Please set this in your environment and try again. Alternatively, set LIBPNG_APNG_FROM_VCPKG=1 if you use vcpkg and installed libpng-apng in it.")
}
}
isEmpty(LIBPNG_APNG_INCLUDE) {
LIBPNG_APNG_INCLUDE = $$(LIBPNG_APNG_INCLUDE)
isEmpty(LIBPNG_APNG_INCLUDE) {
error("For MSVC builds, we require LIBPNG_APNG_INCLUDE to point to the libpng-apng include director to use for compiling. Please set this in your environment and try again. Alternatively, set LIBPNG_APNG_FROM_VCPKG=1 if you use vcpkg and installed libpng-apng in it.")
}
}

LIBS += $$LIBPNG_APNG_LIB $$ZLIB_LIB
INCLUDEPATH += $$LIBPNG_APNG_INCLUDE
}

}

if (macx|linux) {
Expand Down Expand Up @@ -226,7 +170,7 @@ SOURCES += \
sendinghandler.cpp \
debugger.cpp \
settings.cpp \
capture/animated-png.c \
# capture/animated-png.c \
keypad/qtkeypadbridge.cpp \
keypad/keymap.cpp \
keypad/keypadwidget.cpp \
Expand Down Expand Up @@ -339,7 +283,7 @@ HEADERS += \
keypad/numkey.h \
keypad/operkey.h \
keypad/arrowkey.h \
capture/animated-png.h \
# capture/animated-png.h \
debugger/hexwidget.h \
debugger/disasm.h \
tivars_lib_cpp/src/tivarslib_utils.h \
Expand Down
2 changes: 1 addition & 1 deletion gui/qt/settings.cpp
Expand Up @@ -99,7 +99,7 @@ const QString MainWindow::SETTING_KEYPAD_CEMU = QStringLiteral("ce
const QString MainWindow::SETTING_KEYPAD_TILEM = QStringLiteral("tilem");
const QString MainWindow::SETTING_KEYPAD_WABBITEMU = QStringLiteral("wabbitemu");
const QString MainWindow::SETTING_KEYPAD_JSTIFIED = QStringLiteral("jsTIfied");
const QString MainWindow::SETTING_KEYPAD_SMARTPAD = QStringLiteral("SmartPad");
const QString MainWindow::SETTING_KEYPAD_SMARTPAD = QStringLiteral("SmartPad");
const QString MainWindow::SETTING_KEYPAD_CUSTOM = QStringLiteral("custom");

const QString MainWindow::SETTING_PREFERRED_LANG = QStringLiteral("preferred_lang");
Expand Down

0 comments on commit bc6dda6

Please sign in to comment.