Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dosbox
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
CeRiAl
dosbox
Commits
6532757d
Commit
6532757d
authored
May 12, 2013
by
CeRiAl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifications to make it compile with emscripten
parent
48ce93e1
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
295 additions
and
20 deletions
+295
-20
README.emscripten
README.emscripten
+107
-0
configure
configure
+1
-1
cdrom.cpp
src/dos/cdrom.cpp
+43
-11
cdrom.h
src/dos/cdrom.h
+1
-1
cdrom_image.cpp
src/dos/cdrom_image.cpp
+12
-0
cdrom_ioctl_linux.cpp
src/dos/cdrom_ioctl_linux.cpp
+1
-1
dos_mscdex.cpp
src/dos/dos_mscdex.cpp
+3
-1
dos_programs.cpp
src/dos/dos_programs.cpp
+3
-1
dosbox.cpp
src/dosbox.cpp
+114
-0
sdl_mapper.cpp
src/gui/sdl_mapper.cpp
+4
-2
sdlmain.cpp
src/gui/sdlmain.cpp
+2
-1
mixer.cpp
src/hardware/mixer.cpp
+1
-0
libserial.cpp
src/hardware/serialport/libserial.cpp
+1
-1
cross.cpp
src/misc/cross.cpp
+2
-0
No files found.
README.emscripten
0 → 100644
View file @
6532757d
final compile:
==============
/home/cerial/Development/emscripten/em++ -O2 -o dosbox.html dosbox.o cpu/libcpu.a debug/libdebug.a dos/libdos.a fpu/libfpu.a hardware/libhardware.a gui/libgui.a ints/libints.a misc/libmisc.a shell/libshell.a hardware/serialport/libserial.a libs/gui_tk/libgui_tk.a -lGL
diff for emscripten:
====================
diff --git a/em_sdl-config b/em_sdl-config
new file mode 100755
index 0000000..8812103
--- /dev/null
+++ b/em_sdl-config
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+prefix=
+exec_prefix=
+exec_prefix_set=no
+
+usage="\
+Usage: em_sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
+
+if test $# -eq 0; then
+ echo "${usage}" 1>&2
+ exit 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo $prefix
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+ --version)
+ echo 1.2.14
+ ;;
+ --cflags)
+ echo
+ ;;
+ --libs)
+ echo
+ ;;
+ --static-libs)
+ echo
+ ;;
+ *)
+ echo "${usage}" 1>&2
+ exit 1
+ ;;
+ esac
+ shift
+done
+
diff --git a/system/include/SDL/SDL_cpuinfo.h b/system/include/SDL/SDL_cpuinfo.h
index 7fb39ed..b3e5e5f 100644
--- a/system/include/SDL/SDL_cpuinfo.h
+++ b/system/include/SDL/SDL_cpuinfo.h
@@ -50,16 +50,16 @@
#endif
#endif
#ifdef __MMX__
-#include <mmintrin.h>
+//#include <mmintrin.h>
#endif
#ifdef __3dNOW__
#include <mm3dnow.h>
#endif
#ifdef __SSE__
-#include <xmmintrin.h>
+//#include <xmmintrin.h>
#endif
#ifdef __SSE2__
-#include <emmintrin.h>
+//#include <emmintrin.h>
#endif
#endif
diff --git a/tools/shared.py b/tools/shared.py
index 5a9860d..024fc1e 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -717,6 +717,7 @@ class Building:
env['HOST_CXXFLAGS'] = "-W" #if set to nothing, CXXFLAGS is used, which we don't want
env['PKG_CONFIG_LIBDIR'] = path_from_root('system', 'local', 'lib', 'pkgconfig') + os.path.pathsep + path_from_root('system', 'lib', 'pkgconfig')
env['PKG_CONFIG_PATH'] = os.environ.get ('EM_PKG_CONFIG_PATH') or ''
+ env['SDL_CONFIG'] = path_from_root('em_sdl-config') # Override the sdl-config utility in the SDL dev package
return env
@staticmethod
configure
View file @
6532757d
...
...
@@ -4899,7 +4899,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include "SDL.h"
void blah(){
#if SDL_MINOR_VERSION !=
2
#if SDL_MINOR_VERSION !=
3
#error "Only SDL 1.2 supported"
#endif
;
...
...
src/dos/cdrom.cpp
View file @
6532757d
...
...
@@ -34,13 +34,13 @@
CDROM_Interface_SDL
::
CDROM_Interface_SDL
(
void
)
{
driveID
=
0
;
oldLeadOut
=
0
;
cd
=
0
;
//
cd = 0;
}
CDROM_Interface_SDL
::~
CDROM_Interface_SDL
(
void
)
{
StopAudio
();
SDL_CDClose
(
cd
);
cd
=
0
;
//
SDL_CDClose(cd);
//
cd = 0;
}
bool
CDROM_Interface_SDL
::
SetDevice
(
char
*
path
,
int
forceCD
)
{
...
...
@@ -48,14 +48,14 @@ bool CDROM_Interface_SDL::SetDevice(char* path, int forceCD) {
strcpy
(
buffer
,
path
);
upcase
(
buffer
);
int
num
=
SDL_CDNumDrives
();
int
num
=
0
;
//
SDL_CDNumDrives();
if
((
forceCD
>=
0
)
&&
(
forceCD
<
num
))
{
driveID
=
forceCD
;
cd
=
SDL_CDOpen
(
driveID
);
SDL_CDStatus
(
cd
);
//
cd = SDL_CDOpen(driveID);
//
SDL_CDStatus(cd);
return
true
;
};
/*
const char* cdname = 0;
for (int i=0; i<num; i++) {
cdname = SDL_CDName(i);
...
...
@@ -66,28 +66,36 @@ bool CDROM_Interface_SDL::SetDevice(char* path, int forceCD) {
return true;
};
};
*/
return
false
;
}
bool
CDROM_Interface_SDL
::
GetAudioTracks
(
int
&
stTrack
,
int
&
end
,
TMSF
&
leadOut
)
{
return
false
;
/*
if (CD_INDRIVE(SDL_CDStatus(cd))) {
stTrack = 1;
end = cd->numtracks;
FRAMES_TO_MSF(cd->track[cd->numtracks].offset,&leadOut.min,&leadOut.sec,&leadOut.fr);
}
return CD_INDRIVE(SDL_CDStatus(cd));
*/
}
bool
CDROM_Interface_SDL
::
GetAudioTrackInfo
(
int
track
,
TMSF
&
start
,
unsigned
char
&
attr
)
{
return
false
;
/*
if (CD_INDRIVE(SDL_CDStatus(cd))) {
FRAMES_TO_MSF(cd->track[track-1].offset,&start.min,&start.sec,&start.fr);
attr = cd->track[track-1].type<<4;//sdl uses 0 for audio and 4 for data. instead of 0x00 and 0x40
}
return CD_INDRIVE(SDL_CDStatus(cd));
*/
}
bool
CDROM_Interface_SDL
::
GetAudioSub
(
unsigned
char
&
attr
,
unsigned
char
&
track
,
unsigned
char
&
index
,
TMSF
&
relPos
,
TMSF
&
absPos
)
{
return
false
;
/*
if (CD_INDRIVE(SDL_CDStatus(cd))) {
track = cd->cur_track;
index = cd->cur_track;
...
...
@@ -96,17 +104,26 @@ bool CDROM_Interface_SDL::GetAudioSub(unsigned char& attr, unsigned char& track,
FRAMES_TO_MSF(cd->cur_frame+cd->track[track].offset,&absPos.min,&absPos.sec,&absPos.fr);
}
return CD_INDRIVE(SDL_CDStatus(cd));
*/
}
bool
CDROM_Interface_SDL
::
GetAudioStatus
(
bool
&
playing
,
bool
&
pause
){
return
false
;
/*
if (CD_INDRIVE(SDL_CDStatus(cd))) {
playing = (cd->status==CD_PLAYING);
pause = (cd->status==CD_PAUSED);
}
return CD_INDRIVE(SDL_CDStatus(cd));
*/
}
bool
CDROM_Interface_SDL
::
GetMediaTrayStatus
(
bool
&
mediaPresent
,
bool
&
mediaChanged
,
bool
&
trayOpen
)
{
mediaPresent
=
false
;
mediaChanged
=
false
;
trayOpen
=
false
;
return
true
;
/*
SDL_CDStatus(cd);
mediaPresent = (cd->status!=CD_TRAYEMPTY) && (cd->status!=CD_ERROR);
mediaChanged = (oldLeadOut!=cd->track[cd->numtracks].offset);
...
...
@@ -114,34 +131,47 @@ bool CDROM_Interface_SDL::GetMediaTrayStatus(bool& mediaPresent, bool& mediaChan
oldLeadOut = cd->track[cd->numtracks].offset;
if (mediaChanged) SDL_CDStatus(cd);
return true;
*/
}
bool
CDROM_Interface_SDL
::
PlayAudioSector
(
unsigned
long
start
,
unsigned
long
len
)
{
bool
CDROM_Interface_SDL
::
PlayAudioSector
(
unsigned
long
start
,
unsigned
long
len
)
{
return
false
;
/*
// Has to be there, otherwise wrong cd status report (dunno why, sdl bug ?)
SDL_CDClose(cd);
cd = SDL_CDOpen(driveID);
bool success = (SDL_CDPlay(cd,start+150,len)==0);
return success;
*/
}
bool
CDROM_Interface_SDL
::
PauseAudio
(
bool
resume
)
{
bool
CDROM_Interface_SDL
::
PauseAudio
(
bool
resume
)
{
return
false
;
/*
bool success;
if (resume) success = (SDL_CDResume(cd)==0);
else success = (SDL_CDPause (cd)==0);
return success;
*/
}
bool
CDROM_Interface_SDL
::
StopAudio
(
void
)
{
return
false
;
/*
// Has to be there, otherwise wrong cd status report (dunno why, sdl bug ?)
SDL_CDClose(cd);
cd = SDL_CDOpen(driveID);
bool success = (SDL_CDStop(cd)==0);
return success;
*/
}
bool
CDROM_Interface_SDL
::
LoadUnloadMedia
(
bool
unload
)
{
return
false
;
/*
bool success = (SDL_CDEject(cd)==0);
return success;
*/
}
int
CDROM_GetMountType
(
char
*
path
,
int
forceCD
)
{
...
...
@@ -158,18 +188,20 @@ int CDROM_GetMountType(char* path, int forceCD) {
upcase
(
buffer
);
#endif
int
num
=
SDL_CDNumDrives
();
int
num
=
0
;
//
SDL_CDNumDrives();
// If cd drive is forced then check if its in range and return 0
if
((
forceCD
>=
0
)
&&
(
forceCD
<
num
))
{
LOG
(
LOG_ALL
,
LOG_ERROR
)(
"CDROM: Using drive %d"
,
forceCD
);
return
0
;
}
/*
// compare names
for (int i=0; i<num; i++) {
cdName = SDL_CDName(i);
if (strcmp(buffer,cdName)==0) return 0;
};
*/
// Detect ISO
struct
stat
file_stat
;
...
...
src/dos/cdrom.h
View file @
6532757d
...
...
@@ -83,7 +83,7 @@ private:
bool
Open
(
void
);
void
Close
(
void
);
SDL_CD
*
cd
;
//
SDL_CD* cd;
int
driveID
;
Uint32
oldLeadOut
;
};
...
...
src/dos/cdrom_image.cpp
View file @
6532757d
...
...
@@ -184,22 +184,30 @@ bool CDROM_Interface_Image::GetUPC(unsigned char& attr, char* upc)
bool
CDROM_Interface_Image
::
GetAudioTracks
(
int
&
stTrack
,
int
&
end
,
TMSF
&
leadOut
)
{
return
false
;
/*
stTrack = 1;
end = (int)(tracks.size() - 1);
FRAMES_TO_MSF(tracks[tracks.size() - 1].start + 150, &leadOut.min, &leadOut.sec, &leadOut.fr);
return true;
*/
}
bool
CDROM_Interface_Image
::
GetAudioTrackInfo
(
int
track
,
TMSF
&
start
,
unsigned
char
&
attr
)
{
return
false
;
/*
if (track < 1 || track > (int)tracks.size()) return false;
FRAMES_TO_MSF(tracks[track - 1].start + 150, &start.min, &start.sec, &start.fr);
attr = tracks[track - 1].attr;
return true;
*/
}
bool
CDROM_Interface_Image
::
GetAudioSub
(
unsigned
char
&
attr
,
unsigned
char
&
track
,
unsigned
char
&
index
,
TMSF
&
relPos
,
TMSF
&
absPos
)
{
return
false
;
/*
int cur_track = GetTrack(player.currFrame);
if (cur_track < 1) return false;
track = (unsigned char)cur_track;
...
...
@@ -208,6 +216,7 @@ bool CDROM_Interface_Image::GetAudioSub(unsigned char& attr, unsigned char& trac
FRAMES_TO_MSF(player.currFrame + 150, &absPos.min, &absPos.sec, &absPos.fr);
FRAMES_TO_MSF(player.currFrame - tracks[track - 1].start + 150, &relPos.min, &relPos.sec, &relPos.fr);
return true;
*/
}
bool
CDROM_Interface_Image
::
GetAudioStatus
(
bool
&
playing
,
bool
&
pause
)
...
...
@@ -652,6 +661,8 @@ bool CDROM_Interface_Image::GetCueKeyword(string &keyword, istream &in)
bool
CDROM_Interface_Image
::
GetCueFrame
(
int
&
frames
,
istream
&
in
)
{
return
false
;
/*
string msf;
in >> msf;
int min, sec, fr;
...
...
@@ -659,6 +670,7 @@ bool CDROM_Interface_Image::GetCueFrame(int &frames, istream &in)
frames = MSF_TO_FRAMES(min, sec, fr);
return success;
*/
}
bool
CDROM_Interface_Image
::
GetCueString
(
string
&
str
,
istream
&
in
)
...
...
src/dos/cdrom_ioctl_linux.cpp
View file @
6532757d
...
...
@@ -21,7 +21,7 @@
#include "cdrom.h"
#include "support.h"
#if defined (LINUX)
#if defined (
X
LINUX)
#include <fcntl.h>
#include <unistd.h>
#include <linux/cdrom.h>
...
...
src/dos/dos_mscdex.cpp
View file @
6532757d
...
...
@@ -874,6 +874,7 @@ static Bit16u MSCDEX_IOCTL_Input(PhysPt buffer,Bit8u drive_unit) {
TMSF
pos
;
mscdex
->
GetCurrentPos
(
drive_unit
,
pos
);
Bit8u
addr_mode
=
mem_readb
(
buffer
+
1
);
/*
if (addr_mode==0) { // HSG
Bit32u frames=MSF_TO_FRAMES(pos.min, pos.sec, pos.fr);
if (frames<150) MSCDEX_LOG("MSCDEX: Get position: invalid position %d:%d:%d", pos.min, pos.sec, pos.fr);
...
...
@@ -885,9 +886,10 @@ static Bit16u MSCDEX_IOCTL_Input(PhysPt buffer,Bit8u drive_unit) {
mem_writeb(buffer+4,pos.min);
mem_writeb(buffer+5,0x00);
} else {
*/
MSCDEX_LOG
(
"MSCDEX: Get position: invalid address mode %x"
,
addr_mode
);
return
0x03
;
// invalid function
}
//
}
}
break
;
case
0x06
:
/* Get Device status */
mem_writed
(
buffer
+
1
,
mscdex
->
GetDeviceStatus
(
drive_unit
));
...
...
src/dos/dos_programs.cpp
View file @
6532757d
...
...
@@ -107,11 +107,13 @@ public:
// Show list of cdroms
if
(
cmd
->
FindExist
(
"-cd"
,
false
))
{
int
num
=
SDL_CDNumDrives
();
int
num
=
0
;
//
SDL_CDNumDrives();
WriteOut
(
MSG_Get
(
"PROGRAM_MOUNT_CDROMS_FOUND"
),
num
);
/*
for (int i=0; i<num; i++) {
WriteOut("%2d. %s\n",i,SDL_CDName(i));
};
*/
return
;
}
...
...
src/dosbox.cpp
View file @
6532757d
...
...
@@ -18,6 +18,9 @@
/* $Id: dosbox.cpp,v 1.150 2009-11-03 20:17:42 qbix79 Exp $ */
#ifdef EMSCRIPTEN
#include <emscripten.h>
#endif
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -125,6 +128,116 @@ Bit32s ticksDone;
Bit32u
ticksScheduled
;
bool
ticksLocked
;
#ifdef EMSCRIPTEN
static
Bitu
em_mainloop
(
void
)
{
Bits
ret
;
if
(
PIC_RunQueue
())
{
ret
=
(
*
cpudecoder
)();
if
(
GCC_UNLIKELY
(
ret
<
0
))
return
1
;
if
(
ret
>
0
)
{
Bitu
blah
=
(
*
CallBack_Handlers
[
ret
])();
if
(
GCC_UNLIKELY
(
blah
))
return
blah
;
}
#if C_DEBUG
if
(
DEBUG_ExitLoop
())
return
0
;
#endif
}
else
{
GFX_Events
();
if
(
ticksRemain
>
0
)
{
TIMER_AddTick
();
ticksRemain
--
;
}
else
goto
increaseticks
;
}
return
0
;
increaseticks:
if
(
GCC_UNLIKELY
(
ticksLocked
))
{
ticksRemain
=
5
;
/* Reset any auto cycle guessing for this frame */
ticksLast
=
GetTicks
();
ticksAdded
=
0
;
ticksDone
=
0
;
ticksScheduled
=
0
;
}
else
{
Bit32u
ticksNew
;
ticksNew
=
GetTicks
();
ticksScheduled
+=
ticksAdded
;
if
(
ticksNew
>
ticksLast
)
{
ticksRemain
=
ticksNew
-
ticksLast
;
ticksLast
=
ticksNew
;
ticksDone
+=
ticksRemain
;
if
(
ticksRemain
>
20
)
{
ticksRemain
=
20
;
}
ticksAdded
=
ticksRemain
;
if
(
CPU_CycleAutoAdjust
&&
!
CPU_SkipCycleAutoAdjust
)
{
if
(
ticksScheduled
>=
250
||
ticksDone
>=
250
||
(
ticksAdded
>
15
&&
ticksScheduled
>=
5
)
)
{
if
(
ticksDone
<
1
)
ticksDone
=
1
;
// Protect against div by zero
/* ratio we are aiming for is around 90% usage*/
Bit32s
ratio
=
(
ticksScheduled
*
(
CPU_CyclePercUsed
*
90
*
1024
/
100
/
100
))
/
ticksDone
;
Bit32s
new_cmax
=
CPU_CycleMax
;
Bit64s
cproc
=
(
Bit64s
)
CPU_CycleMax
*
(
Bit64s
)
ticksScheduled
;
if
(
cproc
>
0
)
{
/* ignore the cycles added due to the io delay code in order
to have smoother auto cycle adjustments */
double
ratioremoved
=
(
double
)
CPU_IODelayRemoved
/
(
double
)
cproc
;
if
(
ratioremoved
<
1.0
)
{
ratio
=
(
Bit32s
)((
double
)
ratio
*
(
1
-
ratioremoved
));
/* Don't allow very high ratio which can cause us to lock as we don't scale down
* for very low ratios. High ratio might result because of timing resolution */
if
(
ticksScheduled
>=
250
&&
ticksDone
<
10
&&
ratio
>
20480
)
ratio
=
20480
;
Bit64s
cmax_scaled
=
(
Bit64s
)
CPU_CycleMax
*
(
Bit64s
)
ratio
;
if
(
ratio
<=
1024
)
new_cmax
=
(
Bit32s
)(
cmax_scaled
/
(
Bit64s
)
1024
);
else
new_cmax
=
(
Bit32s
)(
1
+
(
CPU_CycleMax
>>
1
)
+
cmax_scaled
/
(
Bit64s
)
2048
);
}
}
if
(
new_cmax
<
CPU_CYCLES_LOWER_LIMIT
)
new_cmax
=
CPU_CYCLES_LOWER_LIMIT
;
/* ratios below 1% are considered to be dropouts due to
temporary load imbalance, the cycles adjusting is skipped */
if
(
ratio
>
10
)
{
/* ratios below 12% along with a large time since the last update
has taken place are most likely caused by heavy load through a
different application, the cycles adjusting is skipped as well */
if
((
ratio
>
120
)
||
(
ticksDone
<
700
))
{
CPU_CycleMax
=
new_cmax
;
if
(
CPU_CycleLimit
>
0
)
{
if
(
CPU_CycleMax
>
CPU_CycleLimit
)
CPU_CycleMax
=
CPU_CycleLimit
;
}
}
}
CPU_IODelayRemoved
=
0
;
ticksDone
=
0
;
ticksScheduled
=
0
;
}
else
if
(
ticksAdded
>
15
)
{
/* ticksAdded > 15 but ticksScheduled < 5, lower the cycles
but do not reset the scheduled/done ticks to take them into
account during the next auto cycle adjustment */
CPU_CycleMax
/=
3
;
if
(
CPU_CycleMax
<
CPU_CYCLES_LOWER_LIMIT
)
CPU_CycleMax
=
CPU_CYCLES_LOWER_LIMIT
;
}
}
}
else
{
ticksAdded
=
0
;
SDL_Delay
(
1
);
ticksDone
-=
GetTicks
()
-
ticksNew
;
if
(
ticksDone
<
0
)
ticksDone
=
0
;
}
}
return
0
;
}
static
Bitu
Normal_Loop
(
void
)
{
emscripten_set_main_loop
((
void
(
*
)())(
em_mainloop
),
30
,
0
);
return
0
;
}
#else
static
Bitu
Normal_Loop
(
void
)
{
Bits
ret
;
while
(
1
)
{
...
...
@@ -229,6 +342,7 @@ increaseticks:
}
return
0
;
}
#endif
void
DOSBOX_SetLoop
(
LoopHandler
*
handler
)
{
loop
=
handler
;
...
...
src/gui/sdl_mapper.cpp
View file @
6532757d
...
...
@@ -24,6 +24,7 @@
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
...
...
@@ -693,7 +694,7 @@ public:
if
(
abs
(
event
->
jaxis
.
value
)
<
25000
)
return
0
;
return
CreateAxisBind
(
event
->
jaxis
.
axis
,
event
->
jaxis
.
value
>
0
);
}
else
if
(
event
->
type
==
SDL_JOYBUTTONDOWN
)
{
if
(
event
->
button
.
which
!=
stick
)
return
0
;
if
(
event
->
button
.
button
!=
stick
)
return
0
;
#if defined (REDUCE_JOYSTICK_POLLING)
return
CreateButtonBind
(
event
->
jbutton
.
button
%
button_wrap
);
#else
...
...
@@ -2243,7 +2244,8 @@ static void InitializeJoysticks(void) {
static
void
CreateBindGroups
(
void
)
{
bindgroups
.
clear
();
new
CKeyBindGroup
(
SDLK_LAST
);
// new CKeyBindGroup(SDLK_LAST);
new
CKeyBindGroup
(
SDL_NUM_SCANCODES
);
if
(
joytype
!=
JOY_NONE
)
{
#if defined (REDUCE_JOYSTICK_POLLING)
// direct access to the SDL joystick, thus removed from the event handling
...
...
src/gui/sdlmain.cpp
View file @
6532757d
...
...
@@ -1743,7 +1743,8 @@ int main(int argc, char* argv[]) {
#if SDL_VERSION_ATLEAST(1, 2, 14)
putenv
(
const_cast
<
char
*>
(
"SDL_DISABLE_LOCK_KEYS=1"
));
#endif
if
(
SDL_Init
(
SDL_INIT_AUDIO
|
SDL_INIT_VIDEO
|
SDL_INIT_TIMER
|
SDL_INIT_CDROM
// if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_CDROM
if
(
SDL_Init
(
SDL_INIT_AUDIO
|
SDL_INIT_VIDEO
|
SDL_INIT_TIMER
|
SDL_INIT_NOPARACHUTE
)
<
0
)
E_Exit
(
"Can't init SDL %s"
,
SDL_GetError
());
sdl
.
inited
=
true
;
...
...
src/hardware/mixer.cpp
View file @
6532757d
...
...
@@ -24,6 +24,7 @@
*/
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <math.h>
...
...
src/hardware/serialport/libserial.cpp
View file @
6532757d
...
...
@@ -254,7 +254,7 @@ bool SERIAL_setCommParameters(COMPORT port,
}
#endif
#if defined (LINUX) || defined (MACOSX) || defined (BSD)
#if defined (
X
LINUX) || defined (MACOSX) || defined (BSD)
#include <string.h> // strlen
#include <stdlib.h>
...
...
src/misc/cross.cpp
View file @
6532757d
...
...
@@ -24,6 +24,8 @@
#include <string>
#include <stdlib.h>
#define DT_REG 8
#ifdef WIN32
#ifndef _WIN32_IE
#define _WIN32_IE 0x0400
...
...
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