Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
f0d94b59
Commit
f0d94b59
authored
Mar 07, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A better way of setting the fullscreen flag for windows on Nintendo DS
parent
ac662b84
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
19 deletions
+73
-19
Makefile.ds
Makefile.ds
+3
-8
SDL_video.c
src/video/SDL_video.c
+0
-4
SDL_ndsvideo.c
src/video/nds/SDL_ndsvideo.c
+3
-7
SDL_ndsvideo.h
src/video/nds/SDL_ndsvideo.h
+2
-0
SDL_ndswindow.c
src/video/nds/SDL_ndswindow.c
+34
-0
SDL_ndswindow.h
src/video/nds/SDL_ndswindow.h
+31
-0
No files found.
Makefile.ds
View file @
f0d94b59
...
@@ -106,6 +106,7 @@ CFILES := \
...
@@ -106,6 +106,7 @@ CFILES := \
power/nds/SDL_syspower.c
\
power/nds/SDL_syspower.c
\
render/SDL_render.c
\
render/SDL_render.c
\
render/SDL_yuv_sw.c
\
render/SDL_yuv_sw.c
\
render/nds/SDL_ndsrender.c
\
render/software/SDL_blendfillrect.c
\
render/software/SDL_blendfillrect.c
\
render/software/SDL_blendline.c
\
render/software/SDL_blendline.c
\
render/software/SDL_blendpoint.c
\
render/software/SDL_blendpoint.c
\
...
@@ -143,16 +144,10 @@ CFILES := \
...
@@ -143,16 +144,10 @@ CFILES := \
video/SDL_surface.c
\
video/SDL_surface.c
\
video/SDL_video.c
\
video/SDL_video.c
\
video/nds/SDL_ndsevents.c
\
video/nds/SDL_ndsevents.c
\
video/nds/SDL_ndsvideo.c
video/nds/SDL_ndsvideo.c
\
video/nds/SDL_ndswindow.c
ifeq
($(USE_HW_RENDERER),1)
# Ideally we should be able to not include the SW renderer at set
# SDL_NO_COMPAT. However that breaks the build.
CFILES
+=
render/nds/SDL_ndsrender.c
else
endif
#CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
#CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
#SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
#SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
#BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
...
...
src/video/SDL_video.c
View file @
f0d94b59
...
@@ -1130,10 +1130,6 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
...
@@ -1130,10 +1130,6 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
/* Some platforms have OpenGL enabled by default */
/* Some platforms have OpenGL enabled by default */
#if (SDL_VIDEO_OPENGL && __MACOSX__) || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
#if (SDL_VIDEO_OPENGL && __MACOSX__) || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
flags
|=
SDL_WINDOW_OPENGL
;
flags
|=
SDL_WINDOW_OPENGL
;
#endif
#ifdef __NDS__
/* Always for Nintendo DS. */
flags
|=
SDL_WINDOW_FULLSCREEN
;
#endif
#endif
if
(
flags
&
SDL_WINDOW_OPENGL
)
{
if
(
flags
&
SDL_WINDOW_OPENGL
)
{
if
(
!
_this
->
GL_CreateContext
)
{
if
(
!
_this
->
GL_CreateContext
)
{
...
...
src/video/nds/SDL_ndsvideo.c
View file @
f0d94b59
...
@@ -21,12 +21,7 @@
...
@@ -21,12 +21,7 @@
*/
*/
#include "SDL_config.h"
#include "SDL_config.h"
/* SDL Nintendo DS video driver implementation
/* SDL Nintendo DS video driver implementation */
* based on dummy driver:
* Initial work by Ryan C. Gordon (icculus@icculus.org). A good portion
* of this was cut-and-pasted from Stephane Peter's work in the AAlib
* SDL video driver. Renamed to "DUMMY" by Sam Lantinga.
*/
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
...
@@ -375,12 +370,13 @@ static SDL_VideoDevice *NDS_CreateDevice(int devindex)
...
@@ -375,12 +370,13 @@ static SDL_VideoDevice *NDS_CreateDevice(int devindex)
device
->
VideoQuit
=
NDS_VideoQuit
;
device
->
VideoQuit
=
NDS_VideoQuit
;
device
->
GetDisplayModes
=
NDS_GetDisplayModes
;
device
->
GetDisplayModes
=
NDS_GetDisplayModes
;
device
->
SetDisplayMode
=
NDS_SetDisplayMode
;
device
->
SetDisplayMode
=
NDS_SetDisplayMode
;
device
->
PumpEvents
=
NDS_PumpEvents
;
device
->
CreateWindow
=
NDS_CreateWindow
;
#ifndef USE_HW_RENDERER
#ifndef USE_HW_RENDERER
device
->
CreateWindowFramebuffer
=
NDS_CreateWindowFramebuffer
;
device
->
CreateWindowFramebuffer
=
NDS_CreateWindowFramebuffer
;
device
->
UpdateWindowFramebuffer
=
NDS_UpdateWindowFramebuffer
;
device
->
UpdateWindowFramebuffer
=
NDS_UpdateWindowFramebuffer
;
device
->
DestroyWindowFramebuffer
=
NDS_DestroyWindowFramebuffer
;
device
->
DestroyWindowFramebuffer
=
NDS_DestroyWindowFramebuffer
;
#endif
#endif
device
->
PumpEvents
=
NDS_PumpEvents
;
device
->
free
=
NDS_DeleteDevice
;
device
->
free
=
NDS_DeleteDevice
;
/* Set the debug output. Use only for under an emulator. Will crash the DS. */
/* Set the debug output. Use only for under an emulator. Will crash the DS. */
...
...
src/video/nds/SDL_ndsvideo.h
View file @
f0d94b59
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
#include "../SDL_sysvideo.h"
#include "../SDL_sysvideo.h"
#include "SDL_ndswindow.h"
#define SCREEN_GAP 92
/* line-equivalent gap between the 2 screens */
#define SCREEN_GAP 92
/* line-equivalent gap between the 2 screens */
/* Per Window information. */
/* Per Window information. */
...
...
src/video/nds/SDL_ndswindow.c
0 → 100644
View file @
f0d94b59
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
#include "SDL_ndsvideo.h"
int
NDS_CreateWindow
(
_THIS
,
SDL_Window
*
window
)
{
/* Nintendo DS windows are always fullscreen */
window
->
flags
|=
SDL_WINDOW_FULLSCREEN
;
return
0
;
}
/* vi: set ts=4 sw=4 expandtab: */
src/video/nds/SDL_ndswindow.h
0 → 100644
View file @
f0d94b59
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
#ifndef _SDL_ndswindow_h
#define _SDL_ndswindow_h
extern
int
NDS_CreateWindow
(
_THIS
,
SDL_Window
*
window
);
#endif
/* _SDL_ndswindow_h */
/* vi: set ts=4 sw=4 expandtab: */
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