Remove unused logger.cpp and logger.h.
This commit is contained in:
parent
3c729a9763
commit
f3fafab8b3
2
cpu.cpp
2
cpu.cpp
@ -13,7 +13,6 @@
|
||||
#include "srtc.h"
|
||||
#include "snapshot.h"
|
||||
#include "cheats.h"
|
||||
#include "logger.h"
|
||||
#ifdef DEBUGGER
|
||||
#include "debug.h"
|
||||
#endif
|
||||
@ -99,7 +98,6 @@ static void S9xSoftResetCPU (void)
|
||||
void S9xReset (void)
|
||||
{
|
||||
S9xResetSaveTimer(FALSE);
|
||||
S9xResetLogger();
|
||||
|
||||
memset(Memory.RAM, 0x55, 0x20000);
|
||||
memset(Memory.VRAM, 0x00, 0x10000);
|
||||
|
@ -255,7 +255,6 @@ list(APPEND SOURCES
|
||||
../stream.cpp
|
||||
../conffile.cpp
|
||||
../bsx.cpp
|
||||
../logger.cpp
|
||||
../snapshot.cpp
|
||||
../screenshot.cpp
|
||||
../movie.cpp
|
||||
@ -321,4 +320,4 @@ install(FILES data/snes9x_32x32.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ico
|
||||
install(FILES data/snes9x_64x64.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps RENAME snes9x.png)
|
||||
install(FILES data/snes9x_128x128.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps RENAME snes9x.png)
|
||||
install(FILES data/snes9x_256x256.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps RENAME snes9x.png)
|
||||
install(FILES data/snes9x.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
|
||||
install(FILES data/snes9x.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
|
||||
|
@ -313,7 +313,6 @@ srcs += [
|
||||
'../stream.cpp',
|
||||
'../conffile.cpp',
|
||||
'../bsx.cpp',
|
||||
'../logger.cpp',
|
||||
'../snapshot.cpp',
|
||||
'../screenshot.cpp',
|
||||
'../movie.cpp',
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "gfx.h"
|
||||
#include "spc7110.h"
|
||||
#include "controls.h"
|
||||
#include "logger.h"
|
||||
#include "cheats.h"
|
||||
#include "movie.h"
|
||||
#include "conffile.h"
|
||||
|
@ -35,7 +35,6 @@ SOURCES_CXX := $(CORE_DIR)/apu/apu.cpp \
|
||||
$(CORE_DIR)/fxemu.cpp \
|
||||
$(CORE_DIR)/gfx.cpp \
|
||||
$(CORE_DIR)/globals.cpp \
|
||||
$(CORE_DIR)/logger.cpp \
|
||||
$(CORE_DIR)/memmap.cpp \
|
||||
$(CORE_DIR)/obc1.cpp \
|
||||
$(CORE_DIR)/msu1.cpp \
|
||||
|
@ -221,7 +221,6 @@
|
||||
<ClInclude Include="..\getset.h" />
|
||||
<ClInclude Include="..\gfx.h" />
|
||||
<ClInclude Include="..\language.h" />
|
||||
<ClInclude Include="..\logger.h" />
|
||||
<ClInclude Include="..\memmap.h" />
|
||||
<ClInclude Include="..\messages.h" />
|
||||
<ClInclude Include="..\missing.h" />
|
||||
@ -285,7 +284,6 @@
|
||||
<ClCompile Include="..\gfx.cpp" />
|
||||
<ClCompile Include="..\globals.cpp" />
|
||||
<ClCompile Include="..\loadzip.cpp" />
|
||||
<ClCompile Include="..\logger.cpp" />
|
||||
<ClCompile Include="..\memmap.cpp" />
|
||||
<ClCompile Include="..\movie.cpp" />
|
||||
<ClCompile Include="..\msu1.cpp" />
|
||||
|
@ -81,9 +81,6 @@
|
||||
<ClInclude Include="..\language.h">
|
||||
<Filter>s9x-source</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\logger.h">
|
||||
<Filter>s9x-source</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\memmap.h">
|
||||
<Filter>s9x-source</Filter>
|
||||
</ClInclude>
|
||||
@ -266,9 +263,6 @@
|
||||
<ClCompile Include="..\loadzip.cpp">
|
||||
<Filter>s9x-source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\logger.cpp">
|
||||
<Filter>s9x-source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\memmap.cpp">
|
||||
<Filter>s9x-source</Filter>
|
||||
</ClCompile>
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "controls.h"
|
||||
#include "cheats.h"
|
||||
#include "movie.h"
|
||||
#include "logger.h"
|
||||
#include "display.h"
|
||||
#include "conffile.h"
|
||||
#include "crosshairs.h"
|
||||
|
98
logger.cpp
98
logger.cpp
@ -1,98 +0,0 @@
|
||||
/*****************************************************************************\
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
This file is licensed under the Snes9x License.
|
||||
For further information, consult the LICENSE file in the root directory.
|
||||
\*****************************************************************************/
|
||||
|
||||
#include "snes9x.h"
|
||||
#include "movie.h"
|
||||
#include "logger.h"
|
||||
|
||||
static int resetno = 0;
|
||||
static int framecounter = 0;
|
||||
static FILE *video = NULL;
|
||||
static FILE *audio = NULL;
|
||||
|
||||
|
||||
void S9xResetLogger (void)
|
||||
{
|
||||
if (!Settings.DumpStreams)
|
||||
return;
|
||||
|
||||
char buffer[128];
|
||||
|
||||
S9xCloseLogger();
|
||||
framecounter = 0;
|
||||
|
||||
sprintf(buffer, "videostream%d.dat", resetno);
|
||||
video = fopen(buffer, "wb");
|
||||
if (!video)
|
||||
{
|
||||
printf("Opening %s failed. Logging cancelled.\n", buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf(buffer, "audiostream%d.dat", resetno);
|
||||
audio = fopen(buffer, "wb");
|
||||
if (!audio)
|
||||
{
|
||||
printf("Opening %s failed. Logging cancelled.\n", buffer);
|
||||
fclose(video);
|
||||
return;
|
||||
}
|
||||
|
||||
resetno++;
|
||||
}
|
||||
|
||||
void S9xCloseLogger (void)
|
||||
{
|
||||
if (video)
|
||||
{
|
||||
fclose(video);
|
||||
video = NULL;
|
||||
}
|
||||
|
||||
if (audio)
|
||||
{
|
||||
fclose(audio);
|
||||
audio = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void S9xVideoLogger (void *pixels, int width, int height, int depth, int bytes_per_line)
|
||||
{
|
||||
int fc = S9xMovieGetFrameCounter();
|
||||
if (fc > 0)
|
||||
framecounter = fc;
|
||||
else
|
||||
framecounter++;
|
||||
|
||||
if (video)
|
||||
{
|
||||
char *data = (char *) pixels;
|
||||
|
||||
for (int i = 0; i < height; i++)
|
||||
{
|
||||
if (!fwrite(data + i * bytes_per_line, depth, width, video))
|
||||
printf ("Error writing video data.\n");
|
||||
}
|
||||
fflush(video);
|
||||
fflush(audio);
|
||||
|
||||
if (Settings.DumpStreamsMaxFrames > 0 && framecounter >= Settings.DumpStreamsMaxFrames)
|
||||
{
|
||||
printf("Logging ended.\n");
|
||||
S9xCloseLogger();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void S9xAudioLogger (void *samples, int length)
|
||||
{
|
||||
if (audio)
|
||||
{
|
||||
if (!fwrite(samples, 1, length, audio))
|
||||
printf ("Error writing audio data.\n");
|
||||
}
|
||||
}
|
15
logger.h
15
logger.h
@ -1,15 +0,0 @@
|
||||
/*****************************************************************************\
|
||||
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||
This file is licensed under the Snes9x License.
|
||||
For further information, consult the LICENSE file in the root directory.
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef _LOGGER_H_
|
||||
#define _LOGGER_H_
|
||||
|
||||
void S9xResetLogger(void);
|
||||
void S9xCloseLogger(void);
|
||||
void S9xVideoLogger(void *, int, int, int, int);
|
||||
void S9xAudioLogger(void *, int);
|
||||
|
||||
#endif
|
@ -8,7 +8,7 @@
|
||||
OS = `uname -s -r -m|sed \"s/ /-/g\"|tr \"[A-Z]\" \"[a-z]\"|tr \"/()\" \"___\"`
|
||||
BUILDDIR = .
|
||||
|
||||
OBJECTS = ../apu/apu.o ../apu/bapu/dsp/sdsp.o ../apu/bapu/smp/smp.o ../apu/bapu/smp/smp_state.o ../bsx.o ../c4.o ../c4emu.o ../cheats.o ../cheats2.o ../clip.o ../conffile.o ../controls.o ../cpu.o ../cpuexec.o ../cpuops.o ../crosshairs.o ../dma.o ../dsp.o ../dsp1.o ../dsp2.o ../dsp3.o ../dsp4.o ../fxinst.o ../fxemu.o ../gfx.o ../globals.o ../logger.o ../memmap.o ../msu1.o ../movie.o ../obc1.o ../ppu.o ../stream.o ../sa1.o ../sa1cpu.o ../screenshot.o ../sdd1.o ../sdd1emu.o ../seta.o ../seta010.o ../seta011.o ../seta018.o ../snapshot.o ../snes9x.o ../spc7110.o ../srtc.o ../tile.o ../tileimpl-n1x1.o ../tileimpl-n2x1.o ../tileimpl-h2x1.o ../filter/2xsai.o ../filter/blit.o ../filter/epx.o ../filter/hq2x.o ../filter/snes_ntsc.o ../statemanager.o ../sha256.o ../bml.o ../compat.o unix.o x11.o
|
||||
OBJECTS = ../apu/apu.o ../apu/bapu/dsp/sdsp.o ../apu/bapu/smp/smp.o ../apu/bapu/smp/smp_state.o ../bsx.o ../c4.o ../c4emu.o ../cheats.o ../cheats2.o ../clip.o ../conffile.o ../controls.o ../cpu.o ../cpuexec.o ../cpuops.o ../crosshairs.o ../dma.o ../dsp.o ../dsp1.o ../dsp2.o ../dsp3.o ../dsp4.o ../fxinst.o ../fxemu.o ../gfx.o ../globals.o ../memmap.o ../msu1.o ../movie.o ../obc1.o ../ppu.o ../stream.o ../sa1.o ../sa1cpu.o ../screenshot.o ../sdd1.o ../sdd1emu.o ../seta.o ../seta010.o ../seta011.o ../seta018.o ../snapshot.o ../snes9x.o ../spc7110.o ../srtc.o ../tile.o ../tileimpl-n1x1.o ../tileimpl-n2x1.o ../tileimpl-h2x1.o ../filter/2xsai.o ../filter/blit.o ../filter/epx.o ../filter/hq2x.o ../filter/snes_ntsc.o ../statemanager.o ../sha256.o ../bml.o ../compat.o unix.o x11.o
|
||||
DEFS = -DMITSHM
|
||||
|
||||
ifdef S9XDEBUGGER
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include "controls.h"
|
||||
#include "cheats.h"
|
||||
#include "movie.h"
|
||||
#include "logger.h"
|
||||
#include "display.h"
|
||||
#include "conffile.h"
|
||||
#ifdef NETPLAY_SUPPORT
|
||||
|
@ -48,7 +48,6 @@
|
||||
#include "ppu.h"
|
||||
#include "controls.h"
|
||||
#include "movie.h"
|
||||
#include "logger.h"
|
||||
#include "conffile.h"
|
||||
#include "blit.h"
|
||||
#include "display.h"
|
||||
@ -1546,9 +1545,6 @@ static void Repaint (bool8 isFrameBoundry)
|
||||
XDefineCursor(GUI.display, GUI.window, GUI.point_cursor);
|
||||
}
|
||||
}
|
||||
|
||||
if (Settings.DumpStreams && isFrameBoundry)
|
||||
S9xVideoLogger(GUI.image->data, SNES_WIDTH * 2, SNES_HEIGHT_EXTENDED * 2, GUI.bytes_per_pixel, GUI.image->bytes_per_line);
|
||||
}
|
||||
|
||||
void S9xTextMode (void)
|
||||
@ -1856,4 +1852,4 @@ bool S9xDisplayPollPointer (uint32 id, int16 *x, int16 *y)
|
||||
*y = GUI.mouse_y;
|
||||
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
|
@ -369,7 +369,6 @@
|
||||
<ClInclude Include="..\jma\s9x-jma.h" />
|
||||
<ClInclude Include="..\jma\winout.h" />
|
||||
<CustomBuild Include="..\language.h" />
|
||||
<CustomBuild Include="..\logger.h" />
|
||||
<CustomBuild Include="..\memmap.h" />
|
||||
<CustomBuild Include="..\messages.h" />
|
||||
<CustomBuild Include="..\missing.h" />
|
||||
@ -516,7 +515,6 @@
|
||||
<ClCompile Include="..\jma\s9x-jma.cpp" />
|
||||
<ClCompile Include="..\jma\winout.cpp" />
|
||||
<ClCompile Include="..\loadzip.cpp" />
|
||||
<ClCompile Include="..\logger.cpp" />
|
||||
<ClCompile Include="..\memmap.cpp" />
|
||||
<ClCompile Include="..\movie.cpp" />
|
||||
<ClCompile Include="..\msu1.cpp" />
|
||||
@ -749,4 +747,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -365,9 +365,6 @@
|
||||
<ClCompile Include="..\loadzip.cpp">
|
||||
<Filter>Emu</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\logger.cpp">
|
||||
<Filter>Emu</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\memmap.cpp">
|
||||
<Filter>Emu</Filter>
|
||||
</ClCompile>
|
||||
@ -758,9 +755,6 @@
|
||||
<CustomBuild Include="..\language.h">
|
||||
<Filter>Emu</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\logger.h">
|
||||
<Filter>Emu</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\memmap.h">
|
||||
<Filter>Emu</Filter>
|
||||
</CustomBuild>
|
||||
|
Loading…
Reference in New Issue
Block a user