Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Small tweaks:

- change <ptr>.ToInt32() to <ptr>.ToInt64() for 64 bit compatibility
- remove a few warnings
  • Loading branch information...
commit 5def630bc2de447b06f8fc0c42a37376f1698324 1 parent 7e0fc46
@mm1352000 mm1352000 authored
View
2  TvEngine3/TVLibrary/Plugins/CustomDevices/DigitalDevices/DigitalDevices.cs
@@ -412,7 +412,7 @@ private bool ReadMmi(int slot, out MenuData menu)
int offset = 16;
for (int i = 0; i < menu.EntryCount + 3; i++)
{
- IntPtr stringPtr = new IntPtr(_mmiBuffer.ToInt32() + offset);
+ IntPtr stringPtr = new IntPtr(_mmiBuffer.ToInt64() + offset);
String entry = Marshal.PtrToStringAnsi(stringPtr);
switch (i)
{
View
6 TvEngine3/TVLibrary/Plugins/CustomDevices/TechnoTrend/TechnoTrend.cs
@@ -1130,7 +1130,7 @@ private int GetDeviceId(IBaseFilter tunerFilter)
}
// Calculate the address of the first medium.
- IntPtr addr = new IntPtr(raw.ToInt32() + 8);
+ IntPtr addr = new IntPtr(raw.ToInt64() + 8);
// Marshal the data into an RPM structure.
RegPinMedium rpm = (RegPinMedium)Marshal.PtrToStructure(addr, typeof(RegPinMedium));
return rpm.dw1;
@@ -1396,7 +1396,7 @@ private void OnDisplayMenuOrList(IntPtr context, byte slotIndex, Int16 numEntrie
byte charChode;
for (int i = 0; i < totalMenuLength - 1; i++) // There is an extra NULL character to indicate the end of the menu.
{
- charChode = Marshal.ReadByte((IntPtr)(entries.ToInt32() + i));
+ charChode = Marshal.ReadByte((IntPtr)(entries.ToInt64() + i));
// Start of a new entry?
if (strings[idx] == null)
{
@@ -1632,7 +1632,7 @@ public override bool Initialise(IBaseFilter tunerFilter, CardType tunerType, Str
}
_deviceHandle = bdaapiOpenHWIdx(_deviceCategory, (uint)deviceId);
- if (_deviceHandle == IntPtr.Zero || _deviceHandle.ToInt32() == -1)
+ if (_deviceHandle == IntPtr.Zero || _deviceHandle.ToInt64() == -1)
{
Log.Debug("TechnoTrend: hardware interface could not be opened");
return false;
View
2  TvEngine3/TVLibrary/TVLibrary/Implementations/BaseSubChannel.cs
@@ -400,7 +400,7 @@ public int OnTeletextReceived(IntPtr data, short packetCount)
{
for (int i = 0; i < packetCount; ++i)
{
- IntPtr packetPtr = new IntPtr(data.ToInt32() + i * 188);
+ IntPtr packetPtr = new IntPtr(data.ToInt64() + i * 188);
ProcessPacket(packetPtr);
}
}
View
2  TvEngine3/TVLibrary/TVLibrary/Implementations/DVB/Graphs/TvCardDvbBase.cs
@@ -136,8 +136,6 @@ private class MpTsAnalyzer {}
private readonly TimeShiftingEPGGrabber _timeshiftingEPGGrabber;
- protected bool _cancelTune;
-
#endregion
#region ctor
View
1  TvEngine3/TVLibrary/TVLibrary/Implementations/DVB/Graphs/TvDvbChannel.cs
@@ -487,7 +487,6 @@ public override void CancelTune()
{
Log.Log.Debug("TvDvbChannel: subchannel {0} cancel tune", _subChannelId);
_cancelTune = true;
- _cancelTune = true;
if (_eventCa != null)
{
_eventCa.Set();
Please sign in to comment.
Something went wrong with that request. Please try again.