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
flycast
Commits
d29339e2
Commit
d29339e2
authored
Dec 14, 2015
by
Libretro-Admin
Browse files
More HAVE_GL commits
parent
a44a3287
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/libretro/libretro.cpp
View file @
d29339e2
...
...
@@ -10,8 +10,8 @@
#include "libretro.h"
u
int
32_t
video
_width
=
640
;
u
int
32_t
video
_height
=
480
;
int
screen
_width
=
640
;
int
screen
_height
=
480
;
u16
kcode
[
4
]
=
{
0xFFFF
,
0xFFFF
,
0xFFFF
,
0xFFFF
};
u8
rt
[
4
]
=
{
0
,
0
,
0
,
0
};
...
...
@@ -156,6 +156,9 @@ void retro_deinit(void)
void
retro_run
(
void
)
{
co_dc_run
();
#if defined(GL) || defined(GLES)
video_cb
(
RETRO_HW_FRAME_BUFFER_VALID
,
screen_width
,
screen_height
,
0
);
#endif
}
void
retro_reset
(
void
)
...
...
@@ -168,6 +171,10 @@ static void context_reset(void)
{
rglgen_resolve_symbols
(
hw_render
.
get_proc_address
);
}
static
void
context_destroy
(
void
)
{
}
#endif
// Loading/unloading games
...
...
@@ -195,9 +202,18 @@ bool retro_load_game(const struct retro_game_info *game)
hw_render
.
context_type
=
RETRO_HW_CONTEXT_OPENGL
;
#endif
#endif
hw_render
.
context_reset
=
context_reset
;
hw_render
.
context_reset
=
context_destroy
;
hw_render
.
depth
=
true
;
hw_render
.
stencil
=
true
;
hw_render
.
bottom_left_origin
=
true
;
if
(
!
environ_cb
(
RETRO_ENVIRONMENT_SET_HW_RENDER
,
&
hw_render
))
return
false
;
#endif
co_switch
(
ct_dc
);
return
true
;
}
bool
retro_load_game_special
(
unsigned
game_type
,
const
struct
retro_game_info
*
info
,
size_t
num_info
)
...
...
@@ -269,10 +285,10 @@ void retro_get_system_info(struct retro_system_info *info)
void
retro_get_system_av_info
(
struct
retro_system_av_info
*
info
)
{
info
->
geometry
.
base_width
=
video
_width
;
info
->
geometry
.
base_height
=
video
_height
;
info
->
geometry
.
max_width
=
video
_width
;
info
->
geometry
.
max_height
=
video
_height
;
info
->
geometry
.
base_width
=
screen
_width
;
info
->
geometry
.
base_height
=
screen
_height
;
info
->
geometry
.
max_width
=
screen
_width
;
info
->
geometry
.
max_height
=
screen
_height
;
info
->
geometry
.
aspect_ratio
=
4.0
/
3.0
;
info
->
timing
.
fps
=
60.0
;
//FIXME: This might differ for non-NTSC games
info
->
timing
.
sample_rate
=
44100.0
;
...
...
core/rend/gles/gles.h
View file @
d29339e2
#pragma once
#include "rend/rend.h"
#ifndef __LIBRETRO__
#ifdef __LIBRETRO__
#include <glsym/glsym.h>
#else
#include <GL3/gl3w.h>
#endif
...
...
core/rend/gles/gles_libretro.cpp
View file @
d29339e2
...
...
@@ -205,8 +205,8 @@ void main() \n\
gl_ctx
gl
;
int
screen_width
;
int
screen_height
;
extern
int
screen_width
;
extern
int
screen_height
;
// Create a basic GLES context
bool
gl_init
(
void
*
wind
,
void
*
disp
)
...
...
shell/libretro/Makefile
View file @
d29339e2
...
...
@@ -142,7 +142,8 @@ OPTFLAGS := -O0
else
OPTFLAGS
:=
-O3
endif
RZDCY_CFLAGS
:=
$(CFLAGS)
-c
$(OPTFLAGS)
-DRELEASE
-frename-registers
-fsingle-precision-constant
-ffast-math
-ftree-vectorize
-fomit-frame-pointer
-D__LIBRETRO__
RZDCY_CFLAGS
+=
$(CFLAGS)
-c
$(OPTFLAGS)
-DRELEASE
-frename-registers
-fsingle-precision-constant
-ffast-math
-ftree-vectorize
-fomit-frame-pointer
-D__LIBRETRO__
CFLAGS
+=
-D__LIBRETRO__
ifeq
($(WITH_DYNAREC), arm)
RZDCY_CFLAGS
+=
-march
=
armv7-a
-mtune
=
cortex-a9
-mfpu
=
vfpv3-d16
...
...
@@ -235,7 +236,7 @@ $(TARGET): $(OBJECTS)
$(CXX)
$(EXTRAFLAGS)
$(INCFLAGS)
$(CFLAGS)
$(MFLAGS)
$(CXXFLAGS)
$<
-o
$@
%.o
:
%.c
$(CC)
$(EXTRAFLAGS)
$(INCFLAGS)
$(CFLAGS)
$<
-o
$@
$(CC)
$(EXTRAFLAGS)
$(INCFLAGS)
$(CFLAGS)
$(MFLAGS)
$<
-o
$@
%.o
:
%.S
$(CC_AS)
$(ASFLAGS)
$(INCFLAGS)
$<
-o
$@
...
...
shell/libretro/Makefile.common
View file @
d29339e2
INCFLAGS
+=
-I
$(CORE_DIR)
\
-I
$(CORE_DIR)
/deps
\
-I
$(CORE_DIR)
/khronos
\
-I
$(CORE_DIR)
/libretro-common/include
SOURCES_C
:=
SOURCES_CXX
:=
$(CORE_DIR)
/cfg/ini.cpp
\
\
$(CORE_DIR)
/hw/arm7/arm_mem.cpp
\
...
...
@@ -102,7 +102,8 @@ ifeq ($(HAVE_GL), 1)
SOURCES_CXX
+=
$(CORE_DIR)
/rend/gles/gldraw.cpp
\
$(CORE_DIR)
/rend/gles/gles_libretro.cpp
\
$(CORE_DIR)
/rend/gles/gltex.cpp
SOURCES_C
+=
$(CORE_DIR)
/libretro-common/glsym/rglgen.c
SOURCES_C
+=
$(CORE_DIR)
/libretro-common/glsym/rglgen.c
\
$(CORE_DIR)
/libretro-common/glsym/glsym_gl.c
endif
...
...
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