Skip to content

Commit

Permalink
Fix display issues on high resolution screens.
Browse files Browse the repository at this point in the history
Upper two bits of the stride were not set.
  • Loading branch information
matrixraym committed Jul 27, 2020
1 parent 839fc38 commit 5a5873b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ void DisplayImage(Image img)

EVE.Send_CMD(EVE.BITMAP_SOURCE(0));
EVE.Send_CMD(EVE.BITMAP_LAYOUT(EVE.RGB565, EVE.Display_Width() * 2, EVE.Display_Height()));
EVE.Send_CMD(EVE.BITMAP_LAYOUTH(EVE.Display_Width() * 2, EVE.Display_Height()));

EVE.Send_CMD(EVE.BEGIN(EVE.BITMAPS)); // Begin bitmap placement
EVE.Send_CMD(EVE.VERTEX2II(0, 0, 0, 0)); // Define the placement position of the previously defined holding area.
Expand Down Expand Up @@ -159,7 +160,6 @@ private void toolStripLabel2_Click(object sender, EventArgs e)

}
bool CurrentState = false;
bool EveInit = false;
bool ConnectEnable = false;
private void timer1_Tick(object sender, EventArgs e)
{
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
7 changes: 7 additions & 0 deletions eve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ public static UInt32 BITMAP_LAYOUT(int format, int linestride, int height)
return (UInt32)((7 << 24) | (((format) & 31) << 19) | (((linestride) & 1023) << 9) | (((height) & 511) << 0));
}

public static UInt32 BITMAP_LAYOUTH(int linestride, int height)
{
int stride = (linestride >> 10) & 3;
height = (height >> 10) & 3;
return (UInt32)((0x28 << 24) | (stride << 2) | height);
}

const string EveDLL = @"eve.dll";

[DllImport(EveDLL, CharSet = CharSet.Ansi)]
Expand Down

0 comments on commit 5a5873b

Please sign in to comment.