Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
Lutro
Commits
347b5ba9
Unverified
Commit
347b5ba9
authored
Mar 23, 2021
by
RobLoach
Browse files
Merge branch 'master' of github.com:libretro/libretro-lutro into lutro.window.showMessageBox
parents
dfd47401
77a05136
Changes
11
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
347b5ba9
...
...
@@ -43,6 +43,14 @@ include:
-
project
:
'
libretro-infrastructure/ci-templates'
file
:
'
/android-jni.yml'
# iOS
-
project
:
'
libretro-infrastructure/ci-templates'
file
:
'
/ios-arm64.yml'
# iOS (armv7)
-
project
:
'
libretro-infrastructure/ci-templates'
file
:
'
/ios9.yml'
################################## CONSOLES ################################
# PlayStation Vita
-
project
:
'
libretro-infrastructure/ci-templates'
...
...
@@ -56,6 +64,12 @@ include:
-
project
:
'
libretro-infrastructure/ci-templates'
file
:
'
/wii-static.yml'
# tvOS (AppleTV)
-
project
:
'
libretro-infrastructure/ci-templates'
file
:
'
/tvos-arm64.yml'
#################################### MISC ##################################
# Stages for building
stages
:
-
build-prepare
...
...
@@ -128,6 +142,24 @@ android-x86:
-
.libretro-android-jni-x86
-
.core-defs
# iOS
libretro-build-ios-arm64
:
extends
:
-
.libretro-ios-arm64-make-default
-
.core-defs
# iOS (armv7) [iOS 9 and up]
libretro-build-ios9
:
extends
:
-
.libretro-ios9-make-default
-
.core-defs
# tvOS
libretro-build-tvos-arm64
:
extends
:
-
.libretro-tvos-arm64-make-default
-
.core-defs
################################### CONSOLES #################################
# Nintendo GameCube
libretro-build-ngc
:
...
...
Makefile
View file @
347b5ba9
...
...
@@ -67,7 +67,7 @@ else ifeq ($(platform), osx)
fpic
:=
-fPIC
SHARED
:=
-dynamiclib
LUA_SYSCFLAGS
:=
-DLUA_USE_MACOSX
CFLAGS
+=
-DHAVE_STRL
CFLAGS
+=
-DHAVE_STRL
-DDONT_WANT_ARM_OPTIMIZATIONS
WANT_PHYSFS
=
0
MMD
:=
ifeq
($(UNIVERSAL),1)
...
...
@@ -107,26 +107,47 @@ else ifneq (,$(findstring ios,$(platform)))
fpic
:=
-fPIC
SHARED
:=
-dynamiclib
DEFINES
:=
-DIOS
CFLAGS
+=
-DHAVE_STRL
CFLAGS
+=
-DHAVE_STRL
-DDONT_WANT_ARM_OPTIMIZATIONS
MINVERSION
:=
ifeq
($(IOSSDK),)
IOSSDK
:=
$(
shell
xcodebuild
-version
-sdk
iphoneos Path
)
endif
ifeq
($(platform),ios-arm64)
ifeq
($(platform),
$(filter $(platform),ios9
ios-arm64)
)
CC
=
cc
-arch
arm64
-isysroot
$(IOSSDK)
else
else
CC
=
cc
-arch
armv7
-isysroot
$(IOSSDK)
endif
IPHONEMINVER
:=
endif
ifeq
($(platform),ios9)
IPHONE
MINVER
=
-miphoneos-version-min
=
8.0
MINVER
SION
=
-miphoneos-version-min
=
8.0
else
IPHONE
MINVER
=
-miphoneos-version-min
=
6.0
MINVER
SION
=
-miphoneos-version-min
=
6.0
endif
LDFLAGS
+=
$(IPHONEMINVER)
FLAGS
+=
$(IPHONEMINVER)
CCFLAGS
+=
$(IPHONEMINVER)
CXXFLAGS
+=
$(IPHONEMINVER)
LDFLAGS
+=
$(MINVERSION)
FLAGS
+=
$(MINVERSION)
CFLAGS
+=
$(MINVERSION)
CXXFLAGS
+=
$(MINVERSION)
LUA_MYCFLAGS
:=
$(MINVERSION)
WANT_PHYSFS
=
0
LUADEFINES
=
-DIOS
else
ifeq
($(platform), tvos-arm64)
TARGET
:=
$(TARGET_NAME)
_libretro_tvos.dylib
fpic
:=
-fPIC
SHARED
:=
-dynamiclib
DEFINES
:=
-DIOS
CFLAGS
+=
-DHAVE_STRL
-DDONT_WANT_ARM_OPTIMIZATIONS
MINVERSION
:=
ifeq
($(IOSSDK),)
IOSSDK
:=
$(
shell
xcodebuild
-version
-sdk
appletvos Path
)
endif
CC
=
cc
-arch
arm64
-isysroot
$(IOSSDK)
LDFLAGS
+=
$(MINVERSION)
FLAGS
+=
$(MINVERSION)
CFLAGS
+=
$(MINVERSION)
CXXFLAGS
+=
$(MINVERSION)
LUA_MYCFLAGS
:=
$(MINVERSION)
WANT_PHYSFS
=
0
LUADEFINES
=
-DIOS
else
ifeq
($(platform), qnx)
TARGET
:=
$(TARGET_NAME)
_libretro_
$(platform)
.so
...
...
@@ -343,10 +364,6 @@ ifeq ($(platform), osx)
endif
endif
ifeq
($(platform),ios-arm64)
LUADEFINES
=
-DIOS
endif
OBJS
:=
$(
addprefix
obj/,
$(OBJS)
)
all
:
$(TARGET)
...
...
Makefile.common
View file @
347b5ba9
...
...
@@ -24,7 +24,7 @@ SOURCES_C := $(CORE_DIR)/libretro.c \
$(CORE_DIR)
/lutro_math.c
\
$(CORE_DIR)
/joystick.c
\
$(CORE_DIR)
/mouse.c
\
$(CORE_DIR)
/window.c
\
$(CORE_DIR)
/
lutro_
window.c
\
$(CORE_DIR)
/painter.c
ifeq
($(WANT_LUALIB),1)
...
...
@@ -183,7 +183,7 @@ endif
# windows msbuild scripts. Notably, msbuild doesn't like window.c because it conflicts with window.c
# in lutro -- such things can only be resolved in msbuld by using project encapsulation.
VORBIS_SOURCES_C
+
=
\
VORBIS_SOURCES_C
:
=
\
$(CORE_DIR)
/deps/ogg/bitwise.c
\
$(CORE_DIR)
/deps/ogg/framing.c
\
$(CORE_DIR)
/deps/vorbis/analysis.c
\
...
...
jni/Android.mk
View file @
347b5ba9
...
...
@@ -15,7 +15,7 @@ endif
include
$(CLEAR_VARS)
LOCAL_MODULE
:=
retro
LOCAL_SRC_FILES
:=
$(SOURCES_C)
LOCAL_SRC_FILES
:=
$(SOURCES_C)
$(VORBIS_SOURCES_C)
LOCAL_CFLAGS
:=
$(COREFLAGS)
-std
=
gnu99
LOCAL_CXXFLAGS
:=
$(COREFLAGS)
LOCAL_LDFLAGS
:=
-Wl
,-version-script
=
$(CORE_DIR)
/link.T
...
...
libretro-common/audio/conversion/float_to_s16.c
View file @
347b5ba9
...
...
@@ -31,7 +31,13 @@
#include <features/features_cpu.h>
#include <audio/conversion/float_to_s16.h>
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS) || defined(HAVE_NEON)
#ifndef HAVE_ARM_NEON_OPTIMIZATIONS
#define HAVE_ARM_NEON_OPTIMIZATIONS
#endif
#endif
#if defined(HAVE_ARM_NEON_OPTIMIZATIONS)
static
bool
float_to_s16_neon_enabled
=
false
;
void
convert_float_s16_asm
(
int16_t
*
out
,
const
float
*
in
,
size_t
samples
);
#endif
...
...
@@ -91,7 +97,7 @@ void convert_float_to_s16(int16_t *out,
samples
=
samples_in
;
i
=
0
;
#elif defined(
_
_ARM_NEON_
_) && !defined(DONT_WANT_ARM_
OPTIMIZATIONS)
#elif defined(
HAVE
_ARM_NEON_OPTIMIZATIONS)
if
(
float_to_s16_neon_enabled
)
{
size_t
aligned_samples
=
samples
&
~
7
;
...
...
@@ -151,7 +157,7 @@ void convert_float_to_s16(int16_t *out,
**/
void
convert_float_to_s16_init_simd
(
void
)
{
#if defined(
_
_ARM_NEON_
_) && !defined(DONT_WANT_ARM_
OPTIMIZATIONS)
#if defined(
HAVE
_ARM_NEON_OPTIMIZATIONS)
unsigned
cpu
=
cpu_features_get
();
if
(
cpu
&
RETRO_SIMD_NEON
)
...
...
libretro-common/audio/conversion/float_to_s16_neon.S
View file @
347b5ba9
...
...
@@ -19,7 +19,7 @@
*
WHETHER
IN
AN
ACTION
OF
CONTRACT
,
TORT
OR
OTHERWISE
,
ARISING
FROM
,
*
OUT
OF
OR
IN
CONNECTION
WITH
THE
SOFTWARE
OR
THE
USE
OR
OTHER
DEALINGS
IN
THE
SOFTWARE
.
*/
#if defined(__ARM_NEON__)
#if defined(__ARM_NEON__)
&& !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#ifndef __MACH__
.
arm
...
...
libretro-common/audio/conversion/float_to_s16_neon.c
View file @
347b5ba9
...
...
@@ -19,7 +19,7 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(__ARM_NEON__)
#if defined(__ARM_NEON__)
&& !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(__thumb__)
#define DECL_ARMMODE(x) " .align 2\n" " .global " x "\n" " .thumb\n" " .thumb_func\n" " .type " x ", %function\n" x ":\n"
...
...
libretro-common/audio/conversion/s16_to_float.c
View file @
347b5ba9
...
...
@@ -29,7 +29,13 @@
#include <features/features_cpu.h>
#include <audio/conversion/s16_to_float.h>
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS) || defined(HAVE_NEON)
#ifndef HAVE_ARM_NEON_OPTIMIZATIONS
#define HAVE_ARM_NEON_OPTIMIZATIONS
#endif
#endif
#if defined(HAVE_ARM_NEON_OPTIMIZATIONS)
static
bool
s16_to_float_neon_enabled
=
false
;
/* Avoid potential hard-float/soft-float ABI issues. */
...
...
@@ -99,7 +105,7 @@ void convert_s16_to_float(float *out,
samples
=
samples_in
;
i
=
0
;
#elif defined(
_
_ARM_NEON_
_) && !defined(DONT_WANT_ARM_
OPTIMIZATIONS)
#elif defined(
HAVE
_ARM_NEON_OPTIMIZATIONS)
if
(
s16_to_float_neon_enabled
)
{
size_t
aligned_samples
=
samples
&
~
7
;
...
...
@@ -180,7 +186,7 @@ void convert_s16_to_float(float *out,
**/
void
convert_s16_to_float_init_simd
(
void
)
{
#if defined(
_
_ARM_NEON_
_) && !defined(DONT_WANT_ARM_
OPTIMIZATIONS)
#if defined(
HAVE
_ARM_NEON_OPTIMIZATIONS)
unsigned
cpu
=
cpu_features_get
();
if
(
cpu
&
RETRO_SIMD_NEON
)
...
...
libretro-common/audio/conversion/s16_to_float_neon.S
View file @
347b5ba9
...
...
@@ -19,7 +19,7 @@
*
WHETHER
IN
AN
ACTION
OF
CONTRACT
,
TORT
OR
OTHERWISE
,
ARISING
FROM
,
*
OUT
OF
OR
IN
CONNECTION
WITH
THE
SOFTWARE
OR
THE
USE
OR
OTHER
DEALINGS
IN
THE
SOFTWARE
.
*/
#if defined(__ARM_NEON__)
#if defined(__ARM_NEON__)
&& !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#ifndef __MACH__
.
arm
...
...
libretro-common/audio/conversion/s16_to_float_neon.c
View file @
347b5ba9
...
...
@@ -19,7 +19,7 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(__ARM_NEON__)
#if defined(__ARM_NEON__)
&& !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#if defined(__thumb__)
#define DECL_ARMMODE(x) " .align 2\n" " .global " x "\n" " .thumb\n" " .thumb_func\n" " .type " x ", %function\n" x ":\n"
...
...
window.c
→
lutro_
window.c
View file @
347b5ba9
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment