Merge branch 'main' of dev.v4.games:v4games/v4k
commit
f9d23b574f
|
@ -16,3 +16,7 @@ engine/v4k.html
|
||||||
*.exe.manifest
|
*.exe.manifest
|
||||||
|
|
||||||
v4k.osx
|
v4k.osx
|
||||||
|
libv4k.*
|
||||||
|
editor
|
||||||
|
*.dSYM
|
||||||
|
.DS_store
|
||||||
|
|
27
MAKE.sh
27
MAKE.sh
|
@ -215,12 +215,24 @@ if [ "$(uname)" = "Darwin" ]; then
|
||||||
chmod +x tools/ninja.osx
|
chmod +x tools/ninja.osx
|
||||||
chmod +x demos/lua/luajit.osx
|
chmod +x demos/lua/luajit.osx
|
||||||
|
|
||||||
export args="-w -Iengine/ -framework cocoa -framework iokit -framework CoreFoundation -framework CoreAudio -framework AudioToolbox $args"
|
export args="-w -Iengine/ -framework cocoa -framework iokit -framework CoreFoundation -framework CoreAudio -framework AudioToolbox $args $flags"
|
||||||
echo build=$build, type=$dll, cc=$cc, args=$args
|
echo build=$build, type=$dll, cc=$cc, args=$args
|
||||||
|
|
||||||
|
# framework (as dynamic library)
|
||||||
|
if [ "$dll" = "dll" ]; then
|
||||||
|
echo libv4k && cc -ObjC -dynamiclib -o libv4k.dylib engine/v4k.c $flags $args
|
||||||
|
cp libv4k.dylib demos/lua
|
||||||
|
export import=libv4k.dylib
|
||||||
|
else
|
||||||
|
# framework
|
||||||
|
echo v4k && cc -c -ObjC engine/v4k.c $flags $args
|
||||||
|
export import=v4k.o
|
||||||
|
fi
|
||||||
|
|
||||||
# User-defined apps
|
# User-defined apps
|
||||||
if [ -n "$app" ]; then
|
if [ -n "$app" ]; then
|
||||||
echo "$app" && $cc -ObjC "$app" engine/v4k.c $args -o "v4k.osx" || rc=1
|
echo "$app" && $cc -ObjC "$app" libv4k.dylib $args -o "v4k.osx" || rc=1
|
||||||
|
# echo "$app" && $cc -ObjC "$app" engine/v4k.c $args -o "v4k.osx" || rc=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if [ "$run" == "yes" ]; then
|
# if [ "$run" == "yes" ]; then
|
||||||
|
@ -233,17 +245,6 @@ if [ "$(uname)" = "Darwin" ]; then
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
|
|
||||||
# # framework (as dynamic library)
|
|
||||||
# if [ "$dll" = "dll" ]; then
|
|
||||||
# echo libv4k && cc -ObjC -dynamiclib -o libv4k.dylib engine/v4k.c $flags $args
|
|
||||||
# cp libv4k.dylib demos/lua
|
|
||||||
# export import=libv4k.dylib
|
|
||||||
# else
|
|
||||||
# # framework
|
|
||||||
# echo v4k && cc -c -ObjC engine/v4k.c $flags $args
|
|
||||||
# export import=v4k.o
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# # editor
|
# # editor
|
||||||
# echo editor && cc -o editor tools/editor/editor.c $import $flags $args &
|
# echo editor && cc -o editor tools/editor/editor.c $import $flags $args &
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ void window_drop_callback(GLFWwindow* window, int count, const char** paths) {
|
||||||
void window_hints(unsigned flags) {
|
void window_hints(unsigned flags) {
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
//glfwInitHint( GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE );
|
//glfwInitHint( GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE );
|
||||||
//glfwWindowHint( GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_FALSE );
|
glfwWindowHint( GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_FALSE );
|
||||||
//glfwWindowHint( GLFW_COCOA_GRAPHICS_SWITCHING, GLFW_FALSE );
|
//glfwWindowHint( GLFW_COCOA_GRAPHICS_SWITCHING, GLFW_FALSE );
|
||||||
//glfwWindowHint( GLFW_COCOA_MENUBAR, GLFW_FALSE );
|
//glfwWindowHint( GLFW_COCOA_MENUBAR, GLFW_FALSE );
|
||||||
#endif
|
#endif
|
||||||
|
@ -1043,7 +1043,7 @@ int window_record(const char *outfile_mp4) {
|
||||||
|
|
||||||
vec2 window_dpi() {
|
vec2 window_dpi() {
|
||||||
vec2 dpi = vec2(1,1);
|
vec2 dpi = vec2(1,1);
|
||||||
#ifndef __EMSCRIPTEN__
|
#if !defined(__EMSCRIPTEN__) && !defined(__APPLE__)
|
||||||
glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &dpi.x, &dpi.y);
|
glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &dpi.x, &dpi.y);
|
||||||
#endif
|
#endif
|
||||||
return dpi;
|
return dpi;
|
||||||
|
|
|
@ -23674,7 +23674,7 @@ void window_drop_callback(GLFWwindow* window, int count, const char** paths) {
|
||||||
void window_hints(unsigned flags) {
|
void window_hints(unsigned flags) {
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
//glfwInitHint( GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE );
|
//glfwInitHint( GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE );
|
||||||
//glfwWindowHint( GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_FALSE );
|
glfwWindowHint( GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_FALSE );
|
||||||
//glfwWindowHint( GLFW_COCOA_GRAPHICS_SWITCHING, GLFW_FALSE );
|
//glfwWindowHint( GLFW_COCOA_GRAPHICS_SWITCHING, GLFW_FALSE );
|
||||||
//glfwWindowHint( GLFW_COCOA_MENUBAR, GLFW_FALSE );
|
//glfwWindowHint( GLFW_COCOA_MENUBAR, GLFW_FALSE );
|
||||||
#endif
|
#endif
|
||||||
|
@ -24549,7 +24549,7 @@ int window_record(const char *outfile_mp4) {
|
||||||
|
|
||||||
vec2 window_dpi() {
|
vec2 window_dpi() {
|
||||||
vec2 dpi = vec2(1,1);
|
vec2 dpi = vec2(1,1);
|
||||||
#ifndef __EMSCRIPTEN__
|
#if !defined(__EMSCRIPTEN__) && !defined(__APPLE__)
|
||||||
glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &dpi.x, &dpi.y);
|
glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &dpi.x, &dpi.y);
|
||||||
#endif
|
#endif
|
||||||
return dpi;
|
return dpi;
|
||||||
|
|
Loading…
Reference in New Issue