fixed 卡顿
This commit is contained in:
parent
0192ae4f1b
commit
e7262578a3
@ -1,4 +1,8 @@
|
||||
using System;
|
||||
using MAME.Core;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace MAME.Core
|
||||
{
|
||||
@ -154,29 +158,29 @@ namespace MAME.Core
|
||||
else
|
||||
{
|
||||
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
int stepIndex = y * Video.fullwidth;
|
||||
for (x = startX; x < endX; x++, target_i++)
|
||||
{
|
||||
i = stepIndex + x;
|
||||
bitmapcolorRect[target_i] = (int)entry_color[curbitmap[i]];
|
||||
}
|
||||
}
|
||||
|
||||
//for (y = startY; y < endY; y++)
|
||||
//{
|
||||
// int stepIndex = y * Video.fullwidth;
|
||||
|
||||
// for (x = startX; x < endX; x++, target_i++)
|
||||
// {
|
||||
// i = stepIndex + x;
|
||||
// bitmapcolorRect[target_i] = (int)entry_color[curbitmap[i]];
|
||||
// }
|
||||
//}
|
||||
|
||||
for (y = startY; y < endY; y++)
|
||||
{
|
||||
int stepIndex = y * Video.fullwidth;
|
||||
//for (x = startX; x < endX; x++, target_i++)
|
||||
//{
|
||||
// i = stepIndex + x;
|
||||
// //bitmapcolorRect[target_i] = (int)entry_color[curbitmap[i]];
|
||||
// // 使用Marshal.Copy进行内存拷贝
|
||||
// Marshal.Copy(Palette.entry_color_Ptr,, Video.bitmapcolorRect_Ptr, endX - startX);
|
||||
//}
|
||||
int stepStartIdx = stepIndex + startX;
|
||||
int linelenght = endX - startX;
|
||||
Array.Copy(Palette.entry_color, stepStartIdx, Video.bitmapcolorRect, 0, linelenght);
|
||||
target_i += linelenght;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user