1
0
Fork 0

New format for mapper handlers to support keeping keys pressed.

Add png capturing of 15,16,32bpp input


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2489
This commit is contained in:
Sjoerd van der Berg 2006-02-12 23:25:46 +00:00
parent b81c210530
commit 03633e3a5c
2 changed files with 93 additions and 53 deletions

View file

@ -283,7 +283,9 @@ static void OPL_RawAdd(Bitu index,Bitu val) {
if (opl.raw.used>=RAW_SIZE) OPL_RawEmptyBuffer();
}
static void OPL_SaveRawEvent(void) {
static void OPL_SaveRawEvent(bool pressed) {
if (!pressed)
return;
/* Check for previously opened wave file */
if (opl.raw.handle) {
OPL_RawEmptyBuffer();
@ -351,7 +353,7 @@ public:
MAPPER_AddHandler(OPL_SaveRawEvent,MK_f7,MMOD1|MMOD2,"caprawopl","Cap OPL");
}
~OPL() {
if (opl.raw.handle) OPL_SaveRawEvent();
if (opl.raw.handle) OPL_SaveRawEvent(true);
OPL2::YM3812Shutdown();
THEOPL3::YMF262Shutdown();
}