Spaces in LOG_MSG and some at the end of the line.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3999
This commit is contained in:
parent
b9b9e2c7d1
commit
a3345eed24
6 changed files with 103 additions and 103 deletions
|
@ -104,10 +104,10 @@ void MIDI_RawOutByte(Bit8u data) {
|
|||
midi.rt_buf[0]=data;
|
||||
midi.handler->PlayMsg(midi.rt_buf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* Test for a active sysex tranfer */
|
||||
if (midi.status==0xf0) {
|
||||
if (!(data&0x80)) {
|
||||
if (!(data&0x80)) {
|
||||
if (midi.sysex.used<(SYSEX_SIZE-1)) midi.sysex.buf[midi.sysex.used++] = data;
|
||||
return;
|
||||
} else {
|
||||
|
@ -175,7 +175,7 @@ public:
|
|||
if (fullconf.find("delaysysex") != std::string::npos) {
|
||||
midi.sysex.start = GetTicks();
|
||||
fullconf.erase(fullconf.find("delaysysex"));
|
||||
LOG_MSG("MIDI:Using delayed SysEx processing");
|
||||
LOG_MSG("MIDI: Using delayed SysEx processing");
|
||||
}
|
||||
std::remove(fullconf.begin(), fullconf.end(), ' ');
|
||||
const char * conf = fullconf.c_str();
|
||||
|
@ -187,24 +187,24 @@ public:
|
|||
while (handler) {
|
||||
if (!strcasecmp(dev,handler->GetName())) {
|
||||
if (!handler->Open(conf)) {
|
||||
LOG_MSG("MIDI:Can't open device:%s with config:%s.",dev,conf);
|
||||
LOG_MSG("MIDI: Can't open device:%s with config:%s.",dev,conf);
|
||||
goto getdefault;
|
||||
}
|
||||
midi.handler=handler;
|
||||
midi.available=true;
|
||||
LOG_MSG("MIDI:Opened device:%s",handler->GetName());
|
||||
midi.available=true;
|
||||
LOG_MSG("MIDI: Opened device:%s",handler->GetName());
|
||||
return;
|
||||
}
|
||||
handler=handler->next;
|
||||
}
|
||||
LOG_MSG("MIDI:Can't find device:%s, finding default handler.",dev);
|
||||
getdefault:
|
||||
LOG_MSG("MIDI: Can't find device:%s, finding default handler.",dev);
|
||||
getdefault:
|
||||
handler=handler_list;
|
||||
while (handler) {
|
||||
if (handler->Open(conf)) {
|
||||
midi.available=true;
|
||||
midi.available=true;
|
||||
midi.handler=handler;
|
||||
LOG_MSG("MIDI:Opened device:%s",handler->GetName());
|
||||
LOG_MSG("MIDI: Opened device:%s",handler->GetName());
|
||||
return;
|
||||
}
|
||||
handler=handler->next;
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
if(nummer < midiOutGetNumDevs()){
|
||||
MIDIOUTCAPS mididev;
|
||||
midiOutGetDevCaps(nummer, &mididev, sizeof(MIDIOUTCAPS));
|
||||
LOG_MSG("MIDI:win32 selected %s",mididev.szPname);
|
||||
LOG_MSG("MIDI: win32 selected %s",mididev.szPname);
|
||||
res = midiOutOpen(&m_out, nummer, (DWORD_PTR)m_event, 0, CALLBACK_EVENT);
|
||||
}
|
||||
} else {
|
||||
|
@ -70,9 +70,9 @@ public:
|
|||
if (WaitForSingleObject (m_event, 2000) == WAIT_TIMEOUT) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("Can't send midi message");
|
||||
return;
|
||||
}
|
||||
}
|
||||
midiOutUnprepareHeader (m_out, &m_hdr, sizeof (m_hdr));
|
||||
|
||||
|
||||
m_hdr.lpData = (char *) sysex;
|
||||
m_hdr.dwBufferLength = len ;
|
||||
m_hdr.dwBytesRecorded = len ;
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
}
|
||||
}
|
||||
void ListAll(Program* base) {
|
||||
unsigned int total = midiOutGetNumDevs();
|
||||
unsigned int total = midiOutGetNumDevs();
|
||||
for(unsigned int i = 0;i < total;i++) {
|
||||
MIDIOUTCAPS mididev;
|
||||
midiOutGetDevCaps(i, &mididev, sizeof(MIDIOUTCAPS));
|
||||
|
@ -97,6 +97,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
MidiHandler_win32 Midi_win32;
|
||||
MidiHandler_win32 Midi_win32;
|
||||
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ SDL_Surface* SDL_SetVideoMode_Wrap(int width,int height,int bpp,Bit32u flags){
|
|||
#if SETMODE_SAVES_CLEAR
|
||||
//TODO clear it.
|
||||
#ifdef C_OPENGL
|
||||
if ((flags & SDL_OPENGL)==0)
|
||||
if ((flags & SDL_OPENGL)==0)
|
||||
SDL_FillRect(sdl.surface,NULL,SDL_MapRGB(sdl.surface->format,0,0,0));
|
||||
else {
|
||||
glClearColor (0.0, 0.0, 0.0, 1.0);
|
||||
|
@ -355,7 +355,7 @@ static void PauseDOSBox(bool pressed) {
|
|||
/* On macs, all aps exit when pressing cmd-q */
|
||||
KillSwitch(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -478,13 +478,13 @@ static SDL_Surface * GFX_SetupSurfaceScaled(Bit32u sdl_flags, Bit32u bpp) {
|
|||
if ( ratio_w < ratio_h) {
|
||||
sdl.clip.w=fixedWidth;
|
||||
sdl.clip.h=(Bit16u)(sdl.draw.height*sdl.draw.scaley*ratio_w + 0.1); //possible rounding issues
|
||||
} else {
|
||||
/*
|
||||
} else {
|
||||
/*
|
||||
* The 0.4 is there to correct for rounding issues.
|
||||
* (partly caused by the rounding issues fix in RENDER_SetSize)
|
||||
*/
|
||||
* (partly caused by the rounding issues fix in RENDER_SetSize)
|
||||
*/
|
||||
sdl.clip.w=(Bit16u)(sdl.draw.width*sdl.draw.scalex*ratio_h + 0.4);
|
||||
sdl.clip.h=(Bit16u)fixedHeight;
|
||||
sdl.clip.h=(Bit16u)fixedHeight;
|
||||
}
|
||||
if (sdl.desktop.fullscreen)
|
||||
sdl.surface = SDL_SetVideoMode_Wrap(fixedWidth,fixedHeight,bpp,sdl_flags);
|
||||
|
@ -660,7 +660,7 @@ dosurface:
|
|||
if (!GFX_SetupSurfaceScaled(0,0)) goto dosurface;
|
||||
sdl.overlay=SDL_CreateYUVOverlay(width*2,height,SDL_UYVY_OVERLAY,sdl.surface);
|
||||
if (!sdl.overlay) {
|
||||
LOG_MSG("SDL:Failed to create overlay, switching back to surface");
|
||||
LOG_MSG("SDL: Failed to create overlay, switching back to surface");
|
||||
goto dosurface;
|
||||
}
|
||||
sdl.desktop.type=SCREEN_OVERLAY;
|
||||
|
@ -679,7 +679,7 @@ dosurface:
|
|||
if (!(flags&GFX_CAN_32) || (flags & GFX_RGBONLY)) goto dosurface;
|
||||
int texsize=2 << int_log2(width > height ? width : height);
|
||||
if (texsize>sdl.opengl.max_texsize) {
|
||||
LOG_MSG("SDL:OPENGL:No support for texturesize of %d, falling back to surface",texsize);
|
||||
LOG_MSG("SDL:OPENGL: No support for texturesize of %d, falling back to surface",texsize);
|
||||
goto dosurface;
|
||||
}
|
||||
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
|
||||
|
@ -688,7 +688,7 @@ dosurface:
|
|||
#endif
|
||||
GFX_SetupSurfaceScaled(SDL_OPENGL,0);
|
||||
if (!sdl.surface || sdl.surface->format->BitsPerPixel<15) {
|
||||
LOG_MSG("SDL:OPENGL:Can't open drawing surface, are you running in 16bpp(or higher) mode?");
|
||||
LOG_MSG("SDL:OPENGL: Can't open drawing surface, are you running in 16bpp (or higher) mode?");
|
||||
goto dosurface;
|
||||
}
|
||||
/* Create the texture and display list */
|
||||
|
@ -804,7 +804,7 @@ void sticky_keys(bool restore){
|
|||
if (!inited){
|
||||
inited = true;
|
||||
SystemParametersInfo(SPI_GETSTICKYKEYS, sizeof(STICKYKEYS), &stick_keys, 0);
|
||||
}
|
||||
}
|
||||
if (restore) {
|
||||
SystemParametersInfo(SPI_SETSTICKYKEYS, sizeof(STICKYKEYS), &stick_keys, 0);
|
||||
return;
|
||||
|
@ -828,7 +828,7 @@ void GFX_SwitchFullScreen(void) {
|
|||
#endif
|
||||
} else {
|
||||
if (sdl.mouse.locked) GFX_CaptureMouse();
|
||||
#if defined (WIN32)
|
||||
#if defined (WIN32)
|
||||
sticky_keys(true); //restore sticky keys to default state in windowed mode.
|
||||
#endif
|
||||
}
|
||||
|
@ -979,7 +979,7 @@ void GFX_EndUpdate( const Bit16u *changedLines ) {
|
|||
IDirectDrawSurface3_Restore(sdl.surface->hwdata->dd_surface);
|
||||
break;
|
||||
default:
|
||||
LOG_MSG("DDRAW:Failed to blit, error %X",ret);
|
||||
LOG_MSG("DDRAW: Failed to blit, error %X",ret);
|
||||
}
|
||||
SDL_Flip(sdl.surface);
|
||||
break;
|
||||
|
@ -1288,7 +1288,7 @@ static void GUI_StartUp(Section * sec) {
|
|||
sdl.opengl.bilinear=false;
|
||||
#endif
|
||||
} else {
|
||||
LOG_MSG("SDL:Unsupported output device %s, switching back to surface",output.c_str());
|
||||
LOG_MSG("SDL: Unsupported output device %s, switching back to surface",output.c_str());
|
||||
sdl.desktop.want_type=SCREEN_SURFACE;//SHOULDN'T BE POSSIBLE anymore
|
||||
}
|
||||
|
||||
|
@ -1330,7 +1330,7 @@ static void GUI_StartUp(Section * sec) {
|
|||
if (sdl.surface == NULL) E_Exit("Could not initialize video: %s",SDL_GetError());
|
||||
sdl.desktop.bpp=sdl.surface->format->BitsPerPixel;
|
||||
if (sdl.desktop.bpp==24) {
|
||||
LOG_MSG("SDL:You are running in 24 bpp mode, this will slow down things!");
|
||||
LOG_MSG("SDL: You are running in 24 bpp mode, this will slow down things!");
|
||||
}
|
||||
GFX_Stop();
|
||||
SDL_WM_SetCaption("DOSBox",VERSION);
|
||||
|
@ -1606,14 +1606,14 @@ void GFX_Events() {
|
|||
// ignore tab events that arrive just after regaining focus. (likely the result of alt-tab)
|
||||
if ((event.key.keysym.sym == SDLK_TAB) && (GetTicks() - sdl.focus_ticks < 2)) break;
|
||||
#endif
|
||||
#if defined (MACOSX)
|
||||
#if defined (MACOSX)
|
||||
case SDL_KEYDOWN:
|
||||
case SDL_KEYUP:
|
||||
/* On macs CMD-Q is the default key to close an application */
|
||||
if (event.key.keysym.sym == SDLK_q && (event.key.keysym.mod == KMOD_RMETA || event.key.keysym.mod == KMOD_LMETA) ) {
|
||||
KillSwitch(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
void MAPPER_CheckEvent(SDL_Event * event);
|
||||
|
@ -1663,7 +1663,7 @@ void Config_Add_SDL() {
|
|||
|
||||
Pbool = sdl_sec->Add_bool("fullscreen",Property::Changeable::Always,false);
|
||||
Pbool->Set_help("Start dosbox directly in fullscreen. (Press ALT-Enter to go back)");
|
||||
|
||||
|
||||
Pbool = sdl_sec->Add_bool("fulldouble",Property::Changeable::Always,false);
|
||||
Pbool->Set_help("Use double buffering in fullscreen. It can reduce screen flickering, but it can also result in a slow DOSBox.");
|
||||
|
||||
|
@ -1736,7 +1736,7 @@ static void show_warning(char const * const message) {
|
|||
Bit32u bmask = 0x0000ff00;
|
||||
#else
|
||||
Bit32u rmask = 0x000000ff;
|
||||
Bit32u gmask = 0x0000ff00;
|
||||
Bit32u gmask = 0x0000ff00;
|
||||
Bit32u bmask = 0x00ff0000;
|
||||
#endif
|
||||
SDL_Surface* splash_surf = SDL_CreateRGBSurface(SDL_SWSURFACE, 640, 400, 32, rmask, gmask, bmask, 0);
|
||||
|
@ -1745,22 +1745,22 @@ static void show_warning(char const * const message) {
|
|||
int x = 120,y = 20;
|
||||
std::string m(message),m2;
|
||||
std::string::size_type a,b,c,d;
|
||||
|
||||
|
||||
while(m.size()) { //Max 50 characters. break on space before or on a newline
|
||||
c = m.find('\n');
|
||||
d = m.rfind(' ',50);
|
||||
if(c>d) a=b=d; else a=b=c;
|
||||
if( a != std::string::npos) b++;
|
||||
if( a != std::string::npos) b++;
|
||||
m2 = m.substr(0,a); m.erase(0,b);
|
||||
OutputString(x,y,m2.c_str(),0xffffffff,0,splash_surf);
|
||||
y += 20;
|
||||
}
|
||||
|
||||
|
||||
SDL_BlitSurface(splash_surf, NULL, sdl.surface, NULL);
|
||||
SDL_Flip(sdl.surface);
|
||||
SDL_Delay(12000);
|
||||
}
|
||||
|
||||
|
||||
static void launcheditor() {
|
||||
std::string path,file;
|
||||
Cross::CreatePlatformConfigDir(path);
|
||||
|
@ -1852,7 +1852,7 @@ static void printconfiglocation() {
|
|||
Cross::CreatePlatformConfigDir(path);
|
||||
Cross::GetPlatformConfigName(file);
|
||||
path += file;
|
||||
|
||||
|
||||
FILE* f = fopen(path.c_str(),"r");
|
||||
if(!f && !control->PrintConfig(path.c_str())) {
|
||||
printf("tried creating %s. but failed",path.c_str());
|
||||
|
@ -1916,7 +1916,7 @@ int main(int argc, char* argv[]) {
|
|||
if(control->cmdline->FindExist("-resetconf")) eraseconfigfile();
|
||||
if(control->cmdline->FindExist("-erasemapper")) erasemapperfile();
|
||||
if(control->cmdline->FindExist("-resetmapper")) erasemapperfile();
|
||||
|
||||
|
||||
/* Can't disable the console with debugger enabled */
|
||||
#if defined(WIN32) && !(C_DEBUG)
|
||||
if (control->cmdline->FindExist("-noconsole")) {
|
||||
|
@ -2028,7 +2028,7 @@ int main(int argc, char* argv[]) {
|
|||
/* Parse configuration files */
|
||||
std::string config_file,config_path;
|
||||
Cross::GetPlatformConfigDir(config_path);
|
||||
|
||||
|
||||
//First parse -userconf
|
||||
if(control->cmdline->FindExist("-userconf",true)){
|
||||
config_file.clear();
|
||||
|
@ -2131,7 +2131,7 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
#if defined (WIN32)
|
||||
sticky_keys(true); //Might not be needed if the shutdown function switches to windowed mode, but it doesn't hurt
|
||||
#endif
|
||||
#endif
|
||||
//Force visible mouse to end user. Somehow this sometimes doesn't happen
|
||||
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue